Larft
Technical User
- Dec 9, 2002
- 55
I am working with a simple IF/OR formula in Excel that I want to return one of several predetermined values based on the content in the reference cell. The data in the cell is text and I am trying to use a wildcard to match the criteria so that if just part of the text string is in the cell it will be a match.
Here is the code:
This works if the value is matched exactly, and if I surround the value with wildcards like this "*text1*" it then only matches the value *text1*. This is easy in Access where the statement:
Will return any permutation of text1
How do I do this in Excel?
Thanks in advance for your help.
Here is the code:
Code:
=IF(OR(OR(F3="text1"),OR(F3="text2")),LOOKUP(F3,{"text1","text2"},{"35-40","28-32"}),"30-35")
This works if the value is matched exactly, and if I surround the value with wildcards like this "*text1*" it then only matches the value *text1*. This is easy in Access where the statement:
Code:
Like "*" &[text1] & "*"
Will return any permutation of text1
How do I do this in Excel?
Thanks in advance for your help.