Forum Discussion
IFS and SEARCH with three different return values
- May 04, 2022
For example:
=IFS(ISNUMBER(SEARCH("Advantage";A16));"Advantage";ISNUMBER(SEARCH("Essential";A16));"Essential";ISNUMBER(SEARCH("Premier";A16));"Premier";TRUE;"")
For example:
=IFS(ISNUMBER(SEARCH("Advantage";A16));"Advantage";ISNUMBER(SEARCH("Essential";A16));"Essential";ISNUMBER(SEARCH("Premier";A16));"Premier";TRUE;"")
I have a similar problem, but for the third condition, I want it to return a value for everything else. In other words, the Advantage and Essential arguments work for me, but then for the third variable, I want everything that isn't Advantage or Essential to be labeled as "Other". How would I do that please?
- HansVogelaarNov 16, 2022MVP
Using the same example:
=IFS(ISNUMBER(SEARCH("Advantage"; A16)); "Advantage"; ISNUMBER(SEARCH("Essential"; A16)); "Essential"; TRUE; "Other")
Please note that Per-Olav_Sandbakk uses semi-colon as list separator. If you use comma as list separator, change the formula to
=IFS(ISNUMBER(SEARCH("Advantage", A16)), "Advantage", ISNUMBER(SEARCH("Essential", A16)), "Essential", TRUE, "Other")
- Holly_MichaelsonNov 16, 2022Copper ContributorYes! Thank you!! And I appreciate you mentioning about the commas. My excel would not accept the semi colons.
With gratitude!
Holly