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.
- Under Home tab | Styles | Conditional Formatting | Manage Rules
- Create a new rule
- Select “Use a formula to determine which cells to format”
- Enter “=A2=1” as the formula
- Format the Fill colour as Red
- 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