How to highlight cells in excel based on the contents of other cells

There might be a time when you have a requirement that needs you to highlight cells under a column based on the values in another column.

E.g. for example, you want to highlight the cells in Price column based on whether they are paid or not. Let’s say when Paid is equals to 1, you will highlight the price as red, and if it is 0, you will highlight the price as blue.

To achieve, conditional formatting rules will need to be added.

  1. Under Home tab | Styles | Conditional Formatting | Manage Rules
  2. Create a new rule
  3. Select “Use a formula to determine which cells to format”
  4. Enter “=A2=1” as the formula
  5. Format the Fill colour as Red
  6. Click okay and apply it to your selection

 

This rule will fulfill the red color formatting of Price column when Paid column cells are equals to 1.

Repeat the same for blue color, but this time change to formula to “=A2=0”

This 2nd rule will fulfill the blue color formatting of Price column when Paid column cells are equals to 0.

And there you have it, you have successfully highlighted the individual cells in excel based on the contents of other cells

Posted in Blogs.