Conditional formatting formula excluding any zeros

graemeal

Active Member
Joined
May 17, 2007
Messages
316
Platform
  1. Windows
In column J I have the following formula =IF(AND(C2<0.25,C2>-0.1),C2,0)

In conditional formatting (or by any other means) I would like to fill the J column cell "red" if values are between 0.25 and -.01, EXCLUDING any cell with zero in it.

I am stumped with how to exclude colouring the cell red if a zero is present.

Thank you
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
your formula works

Book1
ABCDEFGHIJ
10
20
30
40
50
60.150.15
70
80
90
100.20.2
110
120
Sheet1
Cell Formulas
RangeFormula
J1:J12J1=IF(AND(C1<0.25,C1>-0.1),C1,0)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
J:JExpression=IF(AND(C1<0.25,C1>-0.1),C1,0)textNO
 
Upvote 0
Not if I am reading this correctly but I meant 0, not the word zero
 
Upvote 0
One option is to use a formula for Conditional formatting:
Code:
=AND(J1<0.25,J1>-0.1,J1<>0)
Another way to do something similar is to use 3-color scale for CF.
Or you can use 2 separate conditions for formatting.
 
Upvote 0
Solution
Hi,

If I understand correctly, try CF, using formula:

Book3.xlsx
CJ
1
20.250
3-0.05-0.05
400
50.240.24
60.260
70.010.01
80.260
Sheet724
Cell Formulas
RangeFormula
J2:J8J2=IF(AND(C2<0.25,C2>-0.1),C2,0)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
J2:J8Expression=AND(J2<>0,J2<0.25,J2>-0.1)textNO
 
Upvote 0
posts #2 and #6 are basically the same, are they working for you?
if not, please give an example that doesn't
 
Upvote 0

Forum statistics

Threads
1,215,013
Messages
6,122,694
Members
449,092
Latest member
snoom82

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