Conditional Formating Oddity

MikeG

Well-known Member
Joined
Jul 4, 2004
Messages
845
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I am getting a strange thing with Conditional Formating (CF) in Excel 2007, which I wonder if others get, and if anyone has a logical explantion for.

I set up a simple CF rule that says if a given Cell is >3 then color the cell red. And sure enough if I enter a 2, the cell stays uncolored, but if I enter 4 it goes red.

But here's the strange thing, if I enter any text value(s) into the cell, for example, the letter "a", the cell goes red.

Do others get the same thing? Is there a reason for this?

Thanks,

MikeG
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I am getting a strange thing with Conditional Formating (CF) in Excel 2007, which I wonder if others get, and if anyone has a logical explantion for.

I set up a simple CF rule that says if a given Cell is >3 then color the cell red. And sure enough if I enter a 2, the cell stays uncolored, but if I enter 4 it goes red.

But here's the strange thing, if I enter any text value(s) into the cell, for example, the letter "a", the cell goes red.

Do others get the same thing? Is there a reason for this?

Thanks,

MikeG
In Excel any text value has a higher value than any numeric value.

So, logically speaking:

"a">3 = TRUE

Try this formula on the worksheet:

="a">3

Or if you reverse the logic:

=3<"a" = TRUE

To account for that in CF test that the cell actually contains a number:

=AND(COUNT(A1),A1>3)
 
Upvote 0
I think it has to do with the way data is sorted...

If you have a column of Data (mixed numbers and text), and you sort it ASCENDING, Numbers will come first.
 
Upvote 0

Forum statistics

Threads
1,224,516
Messages
6,179,231
Members
452,898
Latest member
Capolavoro009

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