title: VBA autofilter using an array - ignore criteria if it is not in the filtered list
body: <p>I have been looking all over for a solution to this VBA autofiltering issue, any ideas are appreciated:</p>
  
  <p>I have a static list of autofilter criteria in a named range "FslList" - which i have converted into one dimention array for autofiltering column 14 in a data worksheet:</p>
  
  <pre><code>   Dim FSLArray As Variant
          Dim rngFSL As Range
          Set rngFSL = RawData.Worksheets(1).Range("FslList")
          FSLArray = rngFSL.Value
  
          With NewBook.Worksheets(1)
            .Cells.AutoFilter Field:=14, Criteria1:=Application.Transpose(FSLArray), Operator:=xlFilterValues
  </code></pre>
  
  <p>Once i filter out the values from the array - i need to delete them</p>
  
  <pre><code>          With .AutoFilter.Range
              Set DeleteRange = .Offset(1, 0).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible)
            End With
  
            DeleteRange.EntireRow.Delete
            NewBook.Worksheets(1).AutoFilterMode = False
          End With
  </code></pre>
  
  <p>My issue is that my list of data is allways changing, and not all the values from FSLArray are in the column to be filtered. Thus the autofilter stops, once it encounters a criteria that is not on the list - and does not include any following criteria when filtering.</p>
  
  <p>What i would like to do is for the autofilter to continue filtering using other array criteria, if one or more of the elements in the array, is not found amongst the data to be filtered.</p>
  
  <p><strong>EDIT: i have changed the data in my array from numbers (which it is) to letters - it works fine with letters now.</strong></p>
  
  <p>I have tried re-writing the code and define a named range as suggested:</p>
  
  <p>Elements i have in the array (range C11:C14) are: </p>
  
  <pre><code>Acc
  9158
  11958 (this one is not present in the list of data)
  15938
  15940
  </code></pre>
  
  <p>The named range "PODCustList" is defined as follows: </p>
  
  <pre><code>=OFFSET(Acc,1,0,COUNTA(Settings!$C:$C)-1,1)
  </code></pre>
  
  <p>The code is the same:</p>
  
  <pre><code>Dim PODCustArray As Variant
  Dim rngPODCust As Range
  Set rngPODCust = RawData.Worksheets(1).Range("PODCustList")
  PODCustArray = rngPODCust.Value
  
  With Worksheets(1)
    .Cells.AutoFilter Field:=7, Criteria1:=Application.Transpose(PODCustArray), Operator:=xlFilterValues
  </code></pre>
  
  <p>What i get in return after filtering is only rows with "9158" element in them filtered.</p>
  
  <p><strong>SOLVED:  I needed to run my array through this - <code>Criteria1:=Split(Join(Application.Transpose(PODCustArray)))</code> for autofilter to correctly interpret the data within as a string array.</strong></p>
  
  <p>Can i adapt my code, or do i need to use a different approach?</p>
  
  <p>Thank you in advance,</p>