IF Formula to change cell color IF less than the value of another cell

bemp87

Board Regular
Joined
Dec 10, 2016
Messages
102
Hi Community - It's been a while since i've done this and it seemed to have slipped my mind on how to do it. I need a formula to fill a cell color if it is less or greater than another cell, for example:

IF(A1<B1"Fill Color Red")

Essentially i want cell A1 to fill color Red if it is less than the value in B1. I am needing to do this without using conditional formatting as this will be used for an entire row of cells and unless i'm doing something wrong, the conditional formatting gives me an error stating to apply it to a single cell...

Any guidance?
 

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)
Correction:

IF(A1 less than B1 then fill color red)<b1 "fill="" color="" red")<="" html=""></b1>
 
Last edited:
Upvote 0
You can do it with CF.
Select the range you want it to work on & use this formula
=$A1<$B1
 
Upvote 0
@MAIT
You either need to put a space after the < or "Go Advanced" & set HTML to "HTML Off"
 
Upvote 0
Conditional formatting can apple to a entire row or column
Do you mean you always want to compare Column A to Column B
Use this formula in conditional formatting in column A
Just select entire column A and then put this into conditional formatting rule:
=A1<b1< html=""></b1<>
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,224,914
Messages
6,181,720
Members
453,064
Latest member
robatthe2A

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