View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
EuanB EuanB is offline
external usenet poster
 
Posts: 1
Default Excel Searching and Wildcards

Hi All, at the moment I'm writing a spot of VBA code to search through
a couple of sheets and depending on the contents of those sheets
sending the info back to the main sheet for the user. However I also
want to add a wildcard option, so that the users can select a couple
of parameters and a wildcard. Only problem is that my experience of
VBA is rather limited.

My thinking is something like the following bit of code:

'Check for Wildcard setting
If Worksheets("FrontEnd").Range("Info1").Value = "ALL" Then
MainInfo1 = "*"
Else
MainInfo1 = Sheets("FrontEnd").Range("Info1").Value
End If

Then using the * to search, assuming of course that Excel interprates
that as a wildcard.

But I wondered if I have to escape the * character like in C++ or
whether look at assigning the variable to a list of all the
options....e.g. All = "1,2,3..."

I have tried trawling through both the Excel help file and also Google
to no avail as yet.

Any suggestions gratefully appreciated.

Euan
--