Conditional Formatting Help

J

jmj713

I need to use Conditional Formatting to shade a few rows on data based on
their value. Problem is there are cells with zeros and some are empty. I need
to skip these cells. How can I do that?
 
D

David Biddulph

Use AND or OR functions as appropriate in your CF Formula Is condition.
What criterion are you currently applying?
 
J

jmj713

I currently have a simple Highlight rule, "Format all cells based on their
value", with the lowest colored red and the highest colored green. Where do I
need to include the formula to skip zero and empty cells? When I change the
Type to "Formula" and enter the formula provided in the preceding post, Excel
gives me an error, saying "You cannot use relative references..."
 
B

Bob I

Format all cell based on their value. Then "select" Minimum, and Number
and put in what the minimum value should be like .01 or whatever.
 
B

Bob I

Here is a possible work around. Use a 3 color scale. Make the "Midpoint"
Red, and the "Minimum" White. Put the number 0 in Minimum and 0.1 in
Midpoint.
 
J

jmj713

That works to a degree, but sadly it doesn't fix the problem. What this
workaround does is just color the zero-cells white instead of red, but it
keeps their value in mind when coloring the other cells green. So I don't get
the lowest cells shaded red at all, only shades of green. I'm astonished
there isn't a way to specifically ignore cells with zeroes in Conditional
Formatting.
 
B

Bob I

I stand corrected there. Sorry. The issue is related to the numbers
used. In this case you have nothing remotely near 0.1 so pick the lowest
number that you will have (not your 0 or Blank) and put that in the
Midpoint. Let us know how you come out.
 
J

jmj713

I get it now. The problem then is this becomes rather cumbersome to
implement, since this should be automatic. It kind of defeats the purpose if
you need to speficy the lowest number each time (in this case my lowest
number is 38). I think I'll just have to keep doing it as I had done in the
past, just manually selecting only the cells with data and conditionally
formatting them each time. I was just looking for a way to have this done
automatically, but it appears there's just no way.
 
B

Bob I

there is another method, but requires multiple rules. You need to check
for blank and set no formatting. Stop rule. Check for 0, set no
formatting, stop rule. And then set your two color rule.
 
B

Bob I

New Rule "format only cells that contain. equals 0 tick the box for stop
if true
then Manage rules New Rule "format only cells that contain. equals ""
tick the box for stop if true
then Manage rules New Rule format all cells based on their values.

then make sure the "color one" is at bottom or last on the list.
 
J

jmj713

This is so frustrating... I did just as you described and the result is the
same: the zero cells are white, the cells with other numbers are all shades
of green. No red.
 
B

Bob I

Pure Red is applied to the very lowest number, pure green to the very
highest and the color change/distribution is constant from high to low.
Perhaps you have some null in the area/range or a number that is set
really close to Zero. That number or null would be pure red and then you
have a "number gap" going up to what you believe is your first number.
 
J

jmj713

The numbers I need to format are received via a COUNTIF formula, and if there
are no values, it returns a zero, which is hidden. So I'm not sure why this
is happening. There are only either these zero cells, or the various numbers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top