Colour formatting based on Cell values

davecoppins

New Member
Joined
Nov 13, 2018
Messages
11
Hope you can help

I am trying to create a price comparison tool over 3 columns. Column A is the default supplier price and columns B & C are alternative supplier prices. What I would like to achieve is:
If the value of Column B2 or C2 is the same as Column A2 turn Cell Amber
If the value of Column B2 or C2 is greater than Column A2 turn Cell Red
If the value of Column B2 or C2 is less than Column A2 turn Cell Green

Thanks in advance

David
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
1. "turn cell..."

which cell
B2 C2 or A2 ?

2. "If the value of Column B2 or C2 is the same as Column A2 turn Cell Amber"
This contradicts your other conditions.

If the value of B2 is the same as A2, using an OR as you've stated then you havent checked the value of C2 so C2 could be greater than A2 which means both your first AND second condition are BOTH true and your second condition states the should be red (so which should it be Amber or Red?), or if C2 is less than A2 the third conditions says the cell should be green but that means the first and third conditions will BOTH be true (so which should it be Amber or Green?)

As an example
assume A2=3 B2=3 C2=1

First condition will turn the cell Amber (B2 = A2)
Second condition is false, will have no effect
Third condition will turn the cell Green (C2 < A2)

So what should the result be Amber or Green ?


What are you trying to achieve with this colour arrangement?
 
Last edited:
Upvote 0
Thanks for the reply, let me try to clarify.

All figures in Column A will remain un-formatted as this is the target or default value

Cell A2 = 100 / Cell B2 = 101 (turn Cell red) / Cell C2 = 100 (turn Cell amber)
Cell A3 = 100 / Cell B3 = 99 (turn Cell green) / Cell C3 = 101 (turn Cell red)
Cell A4 = 100 / Cell B4 = 101 (turn Cell red) / Cell C4 = 99 (turn Cell green)

ABC
1Supplier 1Supplier 2Supplier 3
2£100£101£100
3£100£99£101
4£10010199

<tbody>
</tbody>

Hope that makes better sense - can't upload images for some reason

Thanks in advance

David
 
Upvote 0
This should work, (untested)

Select the column B AND C ranges in one go.

Conditional Formatting
New Rule
Use a formula to determine...
3 formulas needed

=(B2 = $A2) format as amber
=(B2 > $A2) format as red
=(B2 < $A2) format as green
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,146
Members
449,098
Latest member
Doanvanhieu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top