ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Advanced filter (https://www.excelbanter.com/excel-programming/281631-advanced-filter.html)

ANDRE ANDERSON

Advanced filter
 
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

Debra Dalgleish

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

="="&L1

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

ANDRE ANDERSON wrote:
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.

--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


ANDRE ANDERSON

Advanced filter
 
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!

Debra Dalgleish

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

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


Andre Anderson wrote:
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.


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 03:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com