Link to home
Start Free TrialLog in
Avatar of morinia
moriniaFlag for United States of America

asked on

checking multiple values in VLOOKUP not equal

In order to check Anot equal to "Red" in a Vlookup statement, I would code   A,"<>Red".

Is there a way to check A not equal to "Red", "Green" or "Blue" in vlookup without repeating the criteria similar to A not in ("Red", "Green", "Blue")

The reason is that I am comparing the value to a value returned from a vlookup, so I did not want to have concatanated vlookups if possible
ASKER CERTIFIED SOLUTION
Avatar of radnbne
radnbne
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cyberkiwi
You can use this
If your VLOOKUP is VLOOKUP(E5,$A$1:$B$5,2,FALSE)
You can use this expression

ISNA(MATCH(VLOOKUP(E5,$A$1:$B$5,2,FALSE),{"Red","Blue","Green"},0))

It returns True if the vlookup returns a value that is none of Red,Green,Blue
e.g.

=IF(ISNA(MATCH(VLOOKUP(E5,$A$1:$B$5,2,FALSE),{"Red","Blue","Green"},0)),"no red green or blue", "was matched")
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial