Condition Formatting

kreases

Board Regular
Joined
Oct 26, 2005
Messages
111
Office Version
  1. 2016
Platform
  1. Windows
I have been tasked with formatting multiple cells based on two values, for example

Cell A1 is a Tier number (1, 2 or 3)

Cell B1 is a Percentage and the cell that needs formatting as follows

IF A1 is 1 and B1 is equal to 100% then cell background should be green
IF A1 is 1 and B1 is less than 100% then cell background should be red

IF A1 is 2 and B1 is greater than or equal to 99.75% then cell background should be green
IF A1 is 2 and B1 is less than 99.75% then cell background should be red

IF A1 is 3 and B1 is greater than or equal to 99.50% then cell background should be green
IF A1 is 3 and B1 is less than 99.50% then cell background should be red.

This kind of test would need to be done on every row of data.

Any ideas?

Thanks,

John
 

Some videos you may like

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
Formula for green condition:
Code:
=OR(AND(A1=1,B1=1),AND(A1=2,B1>=0.9975),AND(A1=3,B1>=0.995))

Formula for red condition:
Code:
=OR(AND(A1=1,B1<1),AND(A1=2,B1<=0.9975),AND(A1=3,B1<=0.995))
 

Watch MrExcel Video

Forum statistics

Threads
1,122,371
Messages
5,595,784
Members
414,020
Latest member
Meghdad

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
Top