Input box and filters

S

Still Learning

I would like to use an input box to ask a person for (up to) 2 keywords and
then copy those words to a custom filter to search through approx 10,000
lines of data.

I haven't been able to figure out how to get an input box with 2 seperate
lines for keyword entry's and then copy those words over to the 2 fields in
the custom search.

Any help would be very welcomed.
 
S

Still Learning

I still haven't figured out how to get an input box with 2 seperate lines for
entering words.

Thanks.
 
G

Gord Dibben

Sub Macro1()

firstwd = InputBox("Enter a word")
secondwd = InputBox("Enter a word")
Range("B1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=3, Criteria1:=firstwd, Operator:=xlOr, _
Criteria2:=secondwd
End Sub



Gord Dibben MS Excel MVP
 

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