The core of this formula is INDEX and MATCH.

Finally, INDEX returns the value at that position, “Red”.

it’s possible for you to use INDEX to retrieve individual values, or entire rows and columns.

Excel formula: Get first match cell contains

MATCH supports approximate and exact matching, andwildcards(* ?)

COUNTIF can be used to count…

Excel formula: Range contains one of many values

Excel formula: Cell contains one of many things

Excel INDEX function

Excel MATCH function

Excel COUNTIF function