Advance Filter

  • Thread starter Thread starter Obi-Wan Kenobi
  • Start date Start date
O

Obi-Wan Kenobi

Finally I have managed to build a search tool using Advance Filter, I
run well as a macro. I can search customer details by their membershi
numbers.

My question is there a way I can define the filter further e.g. I ca
input the membership and city details i.e. membership No. (123456) an
City (Nottingham) at the same time and use one button to run the macr
for the search. The code below only lets me put in one search

Sub search2()
'
' search2 Macro
' Macro recorded 22/03/2006 by s
'

'
Range("A10").Select
Range("A10:A25").AdvancedFilter Action:=xlFilterInPlace
CriteriaRange:= _
Range("A1:A2"), Unique:=False
End Su
 
A2 is the search field, I type in what I am searching for and it filter
it from the spreadsheet which starts from A10.

A1 is the title of the search field e.g membership no.
A2 is were I type in the number e.g. 123456

A10 is the start of the spreadsheet from with the membership number i
filterd fro
 
Then you need to use 4 cells instead of 2, in A1 membership no. in B1 city
in A2 12345 in B2 Nottingham

then in the macro

CriteriaRange:= _
Range("A1:B2"), Unique:=False



--

Regards,

Peo Sjoblom





"Obi-Wan Kenobi"
 
Back
Top