Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'm trying to write VBA code that will look at a String variable and tell me
whether or not that String contains another String €” without erroring out. Variable X contains this string: =SUM(AAAA,BBBB) Variable Y contains this string: PPPP I want something that works sort of like this: If Variable X contains Variable Y, Then Variable W = 1 If Variable X does not contain Variable Y, Then Variable W = 2 In the example above, W will equal 2, since X does not contain Y If Y is BBBB then W will equal 1, because X does contain Y Many thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Variable string$ | New Users to Excel | |||
Use a string as a Variable Name | Excel Worksheet Functions | |||
find a variable text string | Excel Discussion (Misc queries) | |||
calling variable within string | Excel Worksheet Functions | |||
Variable in string | Excel Discussion (Misc queries) |