Conditional Formatting with Conditions

Setofskills

New Member
Joined
Aug 17, 2015
Messages
9
I'd like to do a three color conditional format on one column IF another column has a certain value in that row.

For example, if the country is USA and the sales conversion target is 20%, I want to have a rule that makes a three-color spectrum based on the actual conversion rate compared to the target, like a normal three color conditional formatting rule can.

So for the table below, the actual percentage cell for store #2 would be red, the actual percentage cell for store #4 would be light green, and the actual percentage cell for store #5 would be a darker green. The other stores outside of the USA would remain unformatted.

Store #CountryTarget %Actual %
1UK25%35%
2USA20%15%
3Germany30%20%
4USA20%21%
5USA20%35%

<tbody>
</tbody>


I know how to have a three-color conditional formatting spectrum OR have a conditional on whether or not to format a cell, but I can't do both. That is, I can't have a cell have a cell be part of a variable color format AND also have a condition.

Any help would be greatly appreciated!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
If you put the following into another cell you can base your conditional formatting off of it.

Code:
=IF(AND(B5="USA",D5>=0.3),1,IF(AND(B5="USA",D5<0.3,D5>=0.2),2,IF(AND(B5="USA",D5<0.2),3,0)))
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,858
Members
449,052
Latest member
Fuddy_Duddy

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