can't figure out this conditional formatting

logandiana

Board Regular
Joined
Feb 21, 2017
Messages
107
I can't figure this out, seems like it should be simple.
If B>A then fill red.
My conditional formatting formula is =$B1>$A1
So for the example below I would expect the middle line to be the only one filled.
In my case though the first line is also filled. I found that to be true because blank is text and text is always greater than any number.

I tried making my iferror return 0 instead of "", which works, but then I have a bunch of 0s in the column and I want blanks where there is no value.

How do I get around this?


Old Total
New Total
5
=iferror(vlookup($C2.....),"") returns ""
10
=iferror(vlookup($C2.....),"") returns 20
5
=iferror(vlookup($C2.....),"") returns 3

<tbody>
</tbody>
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Try:
Code:
=AND($B1<>"",$B1>$A1)
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,727
Members
449,049
Latest member
MiguekHeka

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