Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You're welcome.
To directly answer your question: did I read somewhere that IF stmts don't support wild cards? That is correct. In the formulas we suggested it's not the IF function that's using the wildcard, it's the COUNTIF function. -- Biff Microsoft Excel MVP "KarenF" wrote in message ... ALL these solutions work beautifully! I never thought of using CountIF in a a plain IF stmt (I'm not trying to count anything), but these are exactly what I need. Thanks to all 3 of you ... KarenF "T. Valko" wrote: If "Food" is *always* at the beginning of the string: =IF(LEFT(X1,4)="Food","Yes,"No") If "Food" might be anywhere within the string: =IF(COUNTIF(X1,"*Food*"),"Yes","No") -- Biff Microsoft Excel MVP "KarenF" wrote in message ... I have a simple IF stmt that I can't get to recognize wild cards. =IF(X1="Food*","yes","no") I want it to return a yes for Food, Food Dept, Food Services - Intl, etc. In short, anything that starts with food. Shouldn't it be easy? I have a macro that imports from another spreadsheet. Once I get a formula to work, I record that step then paste it to my macro and adjust the code so it compiles, then add steps to copy the formula to the rest of the rows. Which is why I can't simply filter on "contains food." If I can get this simple function to work then I'm confident I can apply it to my complex formula. But, did I read somewhere that IF stmts don't support wild cards? KarenF |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
wild cards? | Excel Discussion (Misc queries) | |||
wild cards in SUMIF | Excel Worksheet Functions | |||
If Statement Using Wild Cards | Excel Worksheet Functions | |||
wild cards in formulas and functions | Excel Worksheet Functions | |||
Wild Cards With Arrays | Excel Discussion (Misc queries) |