I’m afraid SWITCH won’t work that way. Based on your example, SWITCH won’t actually look for “Amazon” in the {Company} field. It’ll look for the number returned by the FIND function.
Off the top of my head (which is admittedly a little afternoon-fuzzy at the moment), I can’t think of a way to do what you want other than a joyous nested IF.
Hi Justin,
Yes, of course. You’re completely right! In this case the SWITCH will look for the number 0 or 1.
I’ve tried some other options, but the SWITCH function doesn’t take formulas on the pattern parameter. Otherwise I think I could write a formula that would return the search term instead of a number.
For ref:
SWITCH(expression [, pattern, result]... [, default])
I guess I’ll have to tap onto the API.
Thanks!