Condition Formatting

kreases

Board Regular
Joined
Oct 26, 2005
Messages
114
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
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Formula for green condition:
PHP:
=OR(AND(A1=1,B1=1),AND(A1=2,B1>=0.9975),AND(A1=3,B1>=0.995))

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

Forum statistics

Threads
1,215,679
Messages
6,126,182
Members
449,296
Latest member
tinneytwin

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