Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Search through a couple of sheets is not self defining.
Some functions recognize * as a wild card. Others don't The Find method does and probably is what you should be using. It doesn't require a delimiter unless you are looking for an * in which case you would use ~* -- Regards, Tom Ogilvy "EuanB" wrote in message m... 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 -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
WildCards in Excel | Excel Worksheet Functions | |||
excel 2003 wildcards | Excel Worksheet Functions | |||
Excel - Wildcards | Excel Discussion (Misc queries) | |||
Searching, matching then searching another list based on the match | Excel Discussion (Misc queries) | |||
How can I find strings of wildcards in Excel? | Excel Discussion (Misc queries) |