Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
* in IF statement
How do I include * in an IF statement? For example, how do I write
=IF(A1="*abc*","in there", "not there") when "abc" is contained anywhere in the string in cell A1? TIA |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
* in IF statement
Try one of these:
=IF(ISNUMBER(SEARCH("abc",A1)),"in there","not there") or =IF(COUNTIF(A1,"*abc*"),"in there","not there") Does that help? *********** Regards, Ron XL2002, WinXP-Pro "Harley" wrote: How do I include * in an IF statement? For example, how do I write =IF(A1="*abc*","in there", "not there") when "abc" is contained anywhere in the string in cell A1? TIA |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
* in IF statement
=if(isnumber(search("abc",a1)),"yep","nope")
=search() is case sensitive. =find() is not. alternatively: =if(countif(a1,"*abc*")0, "yep", "nope") (not case sensitive) Harley wrote: How do I include * in an IF statement? For example, how do I write =IF(A1="*abc*","in there", "not there") when "abc" is contained anywhere in the string in cell A1? TIA -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
* in IF statement
Hi Harley,
Try =IF(ISERROR(FIND("abc",A1,1)),"NOT THERE","THERE") Ewan "Harley" wrote: How do I include * in an IF statement? For example, how do I write =IF(A1="*abc*","in there", "not there") when "abc" is contained anywhere in the string in cell A1? TIA |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
* in IF statement
=find() IS case sensitive
=search() IS NOT. (and =countif() is not case sensitive) Dohhh. Dave Peterson wrote: =if(isnumber(search("abc",a1)),"yep","nope") =search() is case sensitive. =find() is not. alternatively: =if(countif(a1,"*abc*")0, "yep", "nope") (not case sensitive) Harley wrote: How do I include * in an IF statement? For example, how do I write =IF(A1="*abc*","in there", "not there") when "abc" is contained anywhere in the string in cell A1? TIA -- Dave Peterson -- Dave Peterson |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
* in IF statement
Thank you Ron and Ewan, all the formulas worked.
"ewan7279" wrote: Hi Harley, Try =IF(ISERROR(FIND("abc",A1,1)),"NOT THERE","THERE") Ewan "Harley" wrote: How do I include * in an IF statement? For example, how do I write =IF(A1="*abc*","in there", "not there") when "abc" is contained anywhere in the string in cell A1? TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Returning Specific Cell Content using IF Statement | Excel Discussion (Misc queries) | |||
SET statement tutorial | Excel Discussion (Misc queries) | |||
If statement | Excel Discussion (Misc queries) | |||
Do I need a sumif or sum of a vlookup formula? | Excel Worksheet Functions | |||
IF Statement | New Users to Excel |