Advanced filter

  • Thread starter Thread starter ANDRE ANDERSON
  • Start date Start date
A

ANDRE ANDERSON

How can I use advanced filter and have it returns only
data that match what is in a cell. I use a listbox and
select a name, this name is referenced in the criteria
cell but it returns all data that looks like the criteria.

Can I reference a cell as a criteria in auto filter.

I use Excel 2000
 
In the criteria cell, use a formula similar to the following:

="="&L1

where the item selected in the listbox is linked to cell L1
 
Thanks so much it worked just fine. I keep your name for future help if
you don't mind. I realize that some people did some ground work before
me.

What about the second question, if you indulge me?

Can I reference a cell as a criteria in auto filter.


Andre Anderson
 
You can reference a worksheet cell in your AutoFilter code. For example:

ws.Range("A1").AutoFilter Field:=7, _
Criteria1:=">=" & Range("K1").Value
 
Back
Top