Forum Discussion
HOW TO FORMAT EXCEL TO HIGHLIGHT AN ENTIRE ROW BASED ON DATA IN TWO CELLS
I NEED HELP TRYING TO CREATE A FORMULA
I need my formula to read two columns ( E & H) and if the columns have yes it will highlight the entire row. If it says no it will highlight a diffrent color.
I was able to create a simple formula to change the one cell's color based on the word yes. But i cannot figure how to get it to highlight an entire row based on one or two columns
2 Replies
Select all the rows that you want to highlight.
In the following, I will assume that the selected range starts in row 2, and that the active cell in the selection is in row 2.
On the Home tab of the ribbon, select Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula =AND($E2="Yes",$H2="Yes")
Click Format...
Activate the Fill tab.
Select a color.
Click OK, then click OK again.
Repeat for other rules, e.g. with =AND($E2="No",$H2="No")
- OliverScheurichGold Contributor
=AND($E1="yes",$H1="yes")You can try this rule for conditional formatting. In the example i chose green as color and this is the "Applies to" range:
=$1:$26You can adapt the rule for other cell entries and colors as required.