Search using variable

Report
-
ac3mark
Posts
13031
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
-
Hello,
I am trying to enter a value (name or partial name) and perform a search in the specified column. I can easily put a specific string in the VBA code but want the user to be able to enter the searches for info. I can’t seem to figure out how to do a search on a variable??


System Configuration: iPhone / Safari 12.1.1

2 replies

Posts
13031
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1576
This can be accomplished in two ways, enter a value into a cell, as in:
thesearch=cells ("A1").value

Or with an inputbox as in:
thesearch=InputBox ("Search what?","Search Box")

Now, place the variable of thesearch into your code!


Have fun!