Spencer
Spencer

Reputation: 55

AND / INDIRECT Conditional Formatting

What I am trying to achieve is if a cell in column AB equals "Yes" and a cell in column AC is blank, then a certain range of cells will be formatted. Currently the rule is not formatting cells that it should. I am basing this code on another formatting rule I am using that works properly, but does not use AND().

=AND(INDIRECT("ab"&ROW())="Yes", INDIRECT("ac"&ROW())="")

I am sure this is an obvious syntax mistake, but I am still very new to Excel and can't figure out why this isn't working.

Upvotes: 1

Views: 666

Answers (1)

user1274820
user1274820

Reputation: 8144

Try This:

=AND($AB1="YES",$AC1="")

Use the format painter to drag the formula around.

As Jeeped said, change the 1 in $AB1 and $AC1 to your first row.

Demo

Upvotes: 4

Related Questions