If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Wildcards in If Statement
It's driving me bonkers. I need to retrieve a true value if the text in a cell contains the word "Rows" plus an * wildcard in an If statement. I am at a loss on what syntax to use to retrieve this value.
|
#2
|
|||
|
|||
Wildcards in If Statement
One way
=IF(ISNUMBER(SEARCH("Rows",A1)),"contains","contai ns not") -- Regards, Peo Sjoblom "Stevkev" wrote in message ... It's driving me bonkers. I need to retrieve a true value if the text in a cell contains the word "Rows" plus an * wildcard in an If statement. I am at a loss on what syntax to use to retrieve this value. |
#3
|
|||
|
|||
Wildcards in If Statement
if that rows is followed directly by an asterisk, then a minor change to Peo's
formula: =IF(ISNUMBER(SEARCH("Rows~*",A1)),"contains","cont ains not") or a different formula: =IF(COUNTIF(A1,"*rows~**")0,"contains","contains not") the ~* means to look for the asterisk itself--not any set of characters (represented by the wild card). Peo Sjoblom wrote: One way =IF(ISNUMBER(SEARCH("Rows",A1)),"contains","contai ns not") -- Regards, Peo Sjoblom "Stevkev" wrote in message ... It's driving me bonkers. I need to retrieve a true value if the text in a cell contains the word "Rows" plus an * wildcard in an If statement. I am at a loss on what syntax to use to retrieve this value. -- Dave Peterson |
Thread Tools | |
Display Modes | |
|
|