Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto filtering

Status
Not open for further replies.

max1565

Technical User
Dec 16, 2002
57
US
I have a database in excel 2000. I would like to filter the database using the value found in worksheets("criteria").range("a4").

can someone tell me how to do this?

thanks
 
const Fld = 1
Crit1 = sheets("Criteria").range("A4").text
Sheets("SheetName").range("A1:M1000").autofilter field:= Fld, criteria1:= Crit1

change the range to fit your "database" - please note it is not really a database - more of a flat table. Change "sheetname" to reflect the name of the sheet you are trying to filter

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top