When an item is “red”, and either “small” or “medium”, the formula returns “x”. All other combinations return an empty string (""). To extend the statement to return TRUE when items are red and either small or medium, we can nest the OR function inside the AND function like this: This snippet will return TRUE only if the value in B6 is “red” AND the value in C6 is either “small” or “medium”. It is placed inside the IF function as the logical test. When the logical test returns TRUE, the IF function returns “x”. When the logical test returns FALSE, the IF function returns an empty string (""). Change the values returned by IF to suit your needs.

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.