kando
kando

Reputation: 603

Conditionally format a range based on a different range

Given the sheet:

A| B | C = SUM($D2:$Z2) | D | E | F | ...

How would I, for a range of rows (for example: 4:50), color columns Cx:Zx (for row x) if Bx > Cx, without making a conditional rule for each individual row and/or each individual column?

(Assume there are a lot of rows and a lot of columns.)

Upvotes: 7

Views: 22342

Answers (1)

Tedinoz
Tedinoz

Reputation: 7949

There are several Q&A on Stackoverflow that would assist you. In particular Conditional formatting based on another cell's value and the answer (with the attached comments) by Zig Mandel. It's a reminder that some Googling is always worthwhile before asking a new question.

  • Select "Custom formatting" from the Format menu.
  • Set "Apply to Range" to C2:Z50
  • "Format cells if", select "Custom formula is" and enter =$B2:$B>$C2:$C
  • Select Done.

B is less than C
B is less than C


B is greater than C
enter image description here

Screen shots

Upvotes: 13

Related Questions