This tutorial will demonstrate how to highlight cells based on another cell value using Conditional Formatting in Excel and Google Sheets.
Highlight Cells Based on Another Cell
To highlight cells based on another cell’s value, you can create a custom formula within a conditional formatting rule.
- Select the range you want to apply formatting to.
- In the Ribbon, select Home > Conditional Formatting > New Rule.
- Select Use a formula to determine which cells to format, and enter the following formula:
- Cell G6 needs to be locked by making it an absolute reference. You can do this by using the $ sign around the row and column indicators, or by pressing F4 on the keyboard.
- Click Format.
- Choose the formatting for cells that meet the conditions.
- Click OK, then OK again to return to the Conditional Formatting Rules Manager.
- Now your range is conditionally formatted if the cell value is greater than the value contained in cell G6.
The rule is based on the cell value in G6, so you can then change the value in G6 to see number of formatted cells change!
Highlight Cells Based on Another Cell in Google Sheets
The process to highlight cells based on another cell in Google Sheets is similar to the process in Excel.
- Highlight the cells you wish to format, and then click on Format, Conditional Formatting.
- The Apply to Range section will already be filled in.
- From the Format Rules section, select Custom Formula.
- Select the fill style for the cells that meet the criteria.
- Click Done to apply the rule.
- Change the value in G7 to see the format of the cells change.