1
votes

Is it possible to create a conditional statement to do the following without having to create the conditional format for each row?

For each row, if row column D cell is less than the value of row column A cell I want it to highlight red. If row column D cell is greater than the value of row column A cell, I want it to highlight green.

Example:

if D1 < A1 Highlight RED
if D1 > A1 Highlight GREEN
if D2 < A2 Highlight RED
if D2 > A2 Highlight Green

and so on and so forth....

enter image description here

1
Yes, definitely possible. You can either use conditional formatting or VBA to highlight cells automatically based on criteria.VBA Pete
When selecting the column D and it's values then trying to apply the conditional format, i can only get it to respond to a specific cell, not the corresponding row value for Column ATheChief

1 Answers

0
votes

Assuming you want Column A's cells to highlight the color, set up your conditional formatting like this:

Formula: =$D1>$A1 for Green, =$D1<$A1 for Red

Then, make sure the "Applies To" range is correct (this is where I personally usually mess up):

Applies to (for both): $A$1:$A$10

enter image description here

If you want the row to highlight, then the "Applies to" range is =$1:$10 or just =$A$1:$D$10.