Advanced filter

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
 
D

Debra Dalgleish

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

="="&L1

where the item selected in the listbox is linked to cell L1
 
A

Andre Anderson

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
D

Debra Dalgleish

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top