# Condition Formatting

#### kreases

##### Board Regular
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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

#### njimack

##### Well-known Member
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))``

#### kreases

##### Board Regular
Neil,

Thanks for that.

John. Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

### Forum statistics

1,168,025
Messages
5,856,905
Members
431,837
Latest member
megantang ### 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.

### Which adblocker are you using?    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

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