OR function in conditional formatting

Let’s take a look at the current example. You are traveling the world and there is a list of expenses you made. Each expense is divided into categories. You want to highlight only two categories: Entertainment and Food. One of a few ways you can do it is to use a formula in a conditional formatting rule.

The OR function in the conditional formatting

  1. Highlight cells from C2 to C9 to choose all dates in the category header.
  2. Navigate to Home >> Styles >> Conditional Formatting >> New Rule.
  3. Click “Use formula to determine which cells to format”.
  4. Inside “Format values where this formula is true”, type this formula: =OR(c2=”food”,c2=”entertainment”)

When you compare values using the comparison operator, you don’t have to pay attention to capitalization.

  1. Click the Format button.
  2. From a new window, click the Fill tab and choose a color. Click OK to confirm.
  3. Click OK to apply the new rule.

The table is formatted and the “Food” and “Entertainment” categories highlighted.