0

I've googled this question and have come across various topics, but I haven't managed to apply it.

Here is my data:

enter image description here

I want to have the following rules in place (example for Company1):

  • If B2 <= D2 (4.91%) -> red
  • If B2 >= F2 (8.24%) -> green
  • If D2 (4.91%) < B2 < F2(8.24%) -> orange

I want to apply the same rule to the other rows so cell references B2, D2, F2 change to B3, D3, F3 and then to B4, D4, F4 etc.

An example for how I've written the rule:

Rule

Formula: = B2 < D2

Format

Fill orange

Applies to

=$B$2 (= B2 doesn't change anything either)

Using the format painter doesn't really work. I click on cell B2 -> format painter -> select B3:B15. When I check the conditional formatting rule in any of the cells of B3:B15, it looks like this:

Rule

Formula: = B3 < D3

Format

Fill orange

Applies to

=$B$3:$B$15

That's fine for B3, but wrong for any of the other cells. So I can apply the conditional formatting rule via format painter to single cell, but not a range. This means clicking on B2, double clicking on format painter and then clicking on each individual cell in B3:B15 works and the so copied rule looks like this (for cell B4):

Rule

Formula: = B4 < D4

Format

Fill orange

Applies to

=$B$4

This is a an option for my example, but not if I have conditional formatting to apply to 200 rows.

Any idea how I can fix this?

1
  • Select B2:B15. Select Conditional formatting, then Create rule - By formula 3 times. Create rules in shown order: (=B2<=D2, Fill red; Stop on true), (=B2>=F2, Fill green; Stop on true), (=AND(D2<B2,B2<F2), Fill red; Stop on true). Applied to is $B$2:$B$15 for all 3 rules. Everything must work. If you need to enlarge the region - open Conditional formatting and alter AppliedTo field to the needed range.
    – Akina
    Sep 6, 2019 at 6:38

1 Answer 1

1

You need 3 steps solution to apply Conditional Formatting.

enter image description here

How it works:

  • Select Cell range O2:O11.
  • From Home TAB reach to Conditional Formatting then New Rules.
  • Step 1 Formula for Red color: =$O2<=$P2.
  • Step 2 for Green color, apply this formula: =$O2>=$R2.
  • Final step for Orange color, apply this formula: =AND($P2<$O2,$O2<$R2)

N.B.

You may adjust cell references in the formula as needed.

3
  • Glad to help you @Alex,, keep asking ☺ Sep 6, 2019 at 9:20
  • Thank you. What I'm confused about is that What I'm confused about is that when I look at the rule in O6, it doesn't show =O6<P6, but O3<P3 (and applies to is =O3:O16). Don't get me wrong, it works as intended, but it doesn't show the exact rule that is being followed.
    – Alex
    Sep 6, 2019 at 11:18
  • @Alex green is for O's are greater than R's and see all O's in green are > than corresponding R's,, Excel highlights selected range by justifying applied rules,, and in your case is Col B but mine is O !! Sep 6, 2019 at 17:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .