How to fill a cell with colour.

Dasco

New member
Joined
Mar 21, 2025
Messages
1
Reaction score
0
Points
1
Excel Version(s)
Microsoft® Excel for Mac
In cell A1 I have a number (0.01). What formula should I use to colour this cel green if it is 0.01 or red if it’s another number. Thank you.
 
two conditional formating rules

=AND(A1<>'',A1<>0.01)
Format RED

and
=A1=0.01
Green

for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
A1 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=AND(A1<>'',A1<>0.01)

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK

repeat for 2nd rule
=A1=0.01

see attached example
 

Attachments

  • Condfrmt-ETAF.xlsx
    8.5 KB · Views: 3
As we are dealing with decimals, to avoid floating point errors, perhaps use ROUND(A1,2) <>0.01 and ROUND(A1,2) =0.01in Etaf's solution instead of A1<>0.01 and A1=0.01 ? You'll have to check that out with real data
 
Back
Top