title: Get unique values of MS Excel AutoFilter in VBA
body: <p>I have a function that filters (A) in a table:</p>
  
  <pre><code>(A) | B | C | D | E
   x
   x
   y
   x
   zx
  </code></pre>
  
  <p>Now I want to output all unique values in row (A) </p>
  
  <p>-> 'x', 'y', 'zx'</p>
  
  <p>before filtering, but have no clue how to get to this information.</p>
  
  <pre><code>Sub MakeFilter()
    Worksheets("Sheet1").Range("A3:AT1000").AutoFilter field:=1, Criteria1:="x", _
         VisibleDropDown:=True
  End Sub
  </code></pre>
  
  <p>In the image you can see how it is done manually. Peter is twice in the list, but in the filter selection list, it's only once. I want only those values in the selection box. All of them.</p>
  
  <p><a href="https://i.stack.imgur.com/run1m.png" rel="nofollow noreferrer">First image</a>
  <a href="https://i.stack.imgur.com/nkqLb.png" rel="nofollow noreferrer">Second image</a></p>