View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove Harlan Grove is offline
external usenet poster
 
Posts: 733
Default Find One Of Several Values Within A Cell

Gary''s Student wrote...
You can avoid VBA if the colors are standalone:

=IF(OR(A1="RED",A1="BLK",A1="BLU",A1="BRN",A1="GR N",A1="GRY",A1="WHT"),A1,
"sorry charlie")

....

Ugh! Brute force and entire cell content matching can be shortened to

=IF(OR(A1={"RED","BLK","BLU","BRN","GRN","GRY","WH T"}),A1,"not found")