Conditional Format based on two variables

dave_br

Board Regular
Joined
Aug 23, 2010
Messages
76
Hi Guys,

is there a formula to use on conditional formatting based on two variables.
i want the text colour to change if the number entered is 26 or less but not if a cell above is >100. i.e. if B2 has 99 in it and you enter 25 in B3 it will not change.

hope ive explained that well enough!

dave
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Which version ofExcel?
More important though, your example does not follow:
" if B2 has 99 in it and you enter 25 in B3 it will not change"
but the conditions are
I want the colour to change when
a) the numer entered is 26 or less (True)
AND
b) but not if a cell above is >100 (cell above is NOT greater then 100 (it's 99))

so you'd expect it to change.. no?

Depending on your answer something along these lines:
=AND(A1<=100,A2<=26)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,568
Messages
6,179,572
Members
452,927
Latest member
whitfieldcraig

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