title: is it possible to get the most common value (String) of a column that is the result of a filter? VBA
body: <p>I'm a bit stuck here. I'm applying a filter in a sheet that's something like this, after applying the filter it looks like this (Example Item 999)</p>
  
  <p>Item Inv. Qty Avi. Qty Flag BOX</p>
  
  <pre><code>999    12   9   N    X1
  999    23   17  Y    X2
  999    1    1   N    X14
  999    21   3   N    X113
  </code></pre>
  
  <p>I was trying to get the "Flag" Column value, (inside the filter and it crashed)
  Code:</p>
  
  <pre><code>With InventorySheet
  .AutoFilterMode = False
   LRowOnQ = .Cells(Rows.Count, "Q").End(xlUp).Row
  .Range("B1").AutoFilter Field:=2, Criteria1:=Project
   .Range("D1").AutoFilter Field:=4, Criteria1:=ContractNumber
   .Range("N1").AutoFilter Field:=14, Criteria1:=Code
  .Range("Q1").AutoFilter Field:=17, Criteria1:="&gt;0"
   Set rangeFilteredInventory = .Range("Q1:Q" &amp; LRowOnQ)
   ControlFlag = .Range("L2").Value
   End With
  </code></pre>
  
  <p>After the filter, it always take the same value.
  Code:</p>
  
  <pre><code>With InventorySheet
       .AutoFilterMode = False
         LRowOnQ = .Cells(Rows.Count, "Q").End(xlUp).Row
        .Range("B1").AutoFilter Field:=2, Criteria1:=Project
       .Range("D1").AutoFilter Field:=4, Criteria1:=ContractNumber
      .Range("N1").AutoFilter Field:=14, Criteria1:=Code
    .Range("Q1").AutoFilter Field:=17, Criteria1:="&gt;0"
    Set rangeFilteredInventory = .Range("Q1:Q" &amp; LRowOnQ)
  End With
  ControlFlag = InventorySheet.Range("L2").Value
  </code></pre>
  
  <p>Is there any way to take the most common letter of the result range? 
  I'm aware there's a average option in subtotal, but I think it's just for numbers.</p>
  
  <p><strong>EDIT</strong>: 
  Tried
  Code:</p>
  
  <pre><code> With InventorySheet
   .AutoFilterMode = False
   LRowOnQ = .Cells(Rows.Count, "Q").End(xlUp).Row
   .Range("B1").AutoFilter Field:=2, Criteria1:=Project
   .Range("D1").AutoFilter Field:=4, Criteria1:=ContractNumber
   .Range("N1").AutoFilter Field:=14, Criteria1:=Code
   .Range("Q1").AutoFilter Field:=17, Criteria1:="&gt;0"
    Set rangeFilteredInventory = .Range("Q1:Q" &amp; LRowOnQ)
    Set ControlRange = .Range("L1:L" &amp; LRowOnQ)
    End With
  ControlFlag = WorksheetFunction.Subtotal(1, ControlRange.SpecialCells(xlCellTypeVisible))
  </code></pre>
  
  <p>And it doesn't even do the loop.</p>