Conditional Formatting

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,664
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I struggling with a basic function of Excel ... conditional formatting.
I simply wish to apply conditional formatting to the cells of column M.
Two Rules ...
If the value in $M(row) > 10.5 then font colour is green
If the value in $M(row) < 10.5 then font colour is red

I click on the column tot highlight the cells.
Conditional Formatting > New Rule > Use a formula to determine which cells to format

For rule 1, I type >10.5, and set the format (green font). I press OK, expectingh the first value of 14.577 in M3 would turn green. It didn't.
For rule 2, I type <10.5, and set the format (red font). I press OK, expecting the the second value of 8.2 in M4 to turn red. It didn't.

When I refer to manage rules, I get this info ...

Rule (applied in order shown)
Formula: ="<10.5" applies to =$M:$M
Formula: =">10.5" applies to =$M:$M

I'm not quite understanding where I'm going wrong, I suspect in how I enter the formula.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Your syntax is wrong but there are built-in capabilities for those already.
Screen Shot 2025-02-10 at 7.11.47 PM.png
 
Upvote 0
Solution
I struggling with a basic function of Excel ... conditional formatting.
I simply wish to apply conditional formatting to the cells of column M.
Two Rules ...
If the value in $M(row) > 10.5 then font colour is green
If the value in $M(row) < 10.5 then font colour is red

I click on the column tot highlight the cells.
Conditional Formatting > New Rule > Use a formula to determine which cells to format

For rule 1, I type >10.5, and set the format (green font). I press OK, expectingh the first value of 14.577 in M3 would turn green. It didn't.
For rule 2, I type <10.5, and set the format (red font). I press OK, expecting the the second value of 8.2 in M4 to turn red. It didn't.

When I refer to manage rules, I get this info ...

Rule (applied in order shown)
Formula: ="<10.5" applies to =$M:$M
Formula: =">10.5" applies to =$M:$M

I'm not quite understanding where I'm going wrong, I suspect in how I enter the formula.
Hi Ark68,

Cubist is right, you should use functions already setup for that. Althought, if you realy want to use a formula, you need to keep in mind that you need to reference a cell/range and unlock the row or the column or both depending on your purpose. In your case, select the column M and the formula you put in conditional formating should look like this:
Excel Formula:
=M1<10.5

If by any chance you want to highlight a part of your table based on one column like so, and prevent coloring if the cell is empty you can select all the column you want and in your formula, lock the column with $:
Excel Formula:
=AND($M1<>"",$M1<10.5)

Classeur1
GHIJKLMN
1test110
2test220
3
Feuil1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
H:MExpression=ET($M1<>"";$M1>10,5)textNO
H:MExpression=ET($M1<>"";$M1<10,5)textNO


Also, in your case nothing happend if = 10.5. Have you thought about >=10.5 or <=10.5?

Bests regards,

Vincent
 
Upvote 0
My apologies for not acknowledging your contributions more promptly.
Thank you very much for sharing your knowledge. @Cubist, clearly I was making things more complicated than I needed. I do recall looking at that, but was thrown off having overlooked the ability to customize the formatting.
Vincent, thanks so much for the lesson, I found it very helpful in my understanding of how CF works.
 
Upvote 0

Forum statistics

Threads
1,226,513
Messages
6,191,475
Members
453,658
Latest member
healmo

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