+ Reply to Thread
Results 1 to 6 of 6

Basic Conditional Formatting seems to give inconsistent results for zeroes.

  1. #1
    Registered User
    Join Date
    11-03-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    21

    Basic Conditional Formatting seems to give inconsistent results for zeroes.

    Hi Everyone,

    I'm using conditional formatting in a very basic way. It's not even a complicated rule I'm using, just the basic "from the menu" greater than and less than formatting from the Conditional Formatting > Highlight Cell Rules dropdown menu.

    Green for values greater than zero, red for values less than zero. No other modifications or anything. The intention is to have the exact zero show up without any highlighting at all. Simple!

    In practice, however, the greater-thans ARE green, the lesser-thans ARE red... BUT, the zeros aren't really behaving. Most of them are clear, but some are showing red, and some are showing green.

    zeroes1.JPG zeroes2.JPG

    I ran the conditional formatting on the whole sheet at once, and I only ran those two rules, so it shouldn't be a conflict of any sort. The fields are formatted as "Number" fields, but I tried as "Currency" as well and they still cause the highlighting. They all contain basic formulas to calculate the values they display, but I just can't figure out why some zeroes are counted as zero, some are counted positive, and some are counted negative. They're all just zero!

    Any ideas would be appreciated!

  2. #2
    Registered User
    Join Date
    11-03-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Basic Conditional Formatting seems to give inconsistent results for zeroes.

    ***UPDATE***

    Okay, so on a hunch from re-reading that I just wrote "they're all just zero" .... I thought that maybe they might not actually BE zeroes, but that they might just LOOK LIKE zeroes. I manually entered a "0" into one of the highlighted cells just to see, and it DID change to white.

    I undid that change and put it back to the formula that's calculating the actual values, and it went back to red again. So I widened the column out and increased the decimal display out to 13 decimal places and found a sneaky non-zero value!

    zerodecimal.JPG

    Is there any way to get Excel to not consider this six-trillionth of a cent as being a positive value, so that it will format it as a zero?

    I'm happy for anything less than a cent to be assumed as zero, but how do I tell Excel this?

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Basic Conditional Formatting seems to give inconsistent results for zeroes.

    Are they really zero, or do they just LOOK LIKE zero because of formatting applied to the number of decimal places that are displayed?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Basic Conditional Formatting seems to give inconsistent results for zeroes.

    Round them using something like

    =ROUND(the_formula_that_returns_the_number,2)

  5. #5
    Registered User
    Join Date
    11-03-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Basic Conditional Formatting seems to give inconsistent results for zeroes.

    Genius Glenn! Thanks for the reply!

    I put it in as =ROUND(SUM(U32,X32),2) and it seems to have done the trick. All my zeroes are zeroes! (Which, incidentally, is a great name for a rock album!)

    Cheers, and thanks again!
    ~Joe

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Basic Conditional Formatting seems to give inconsistent results for zeroes.

    You're welcome and thanks for the Reputation...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Conditional Formatting complete rows in data table - inconsistent
    By BuZZarD73 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-13-2014, 10:31 AM
  2. [SOLVED] Inconsistent Conditional Formatting result
    By JohnWS in forum Excel General
    Replies: 6
    Last Post: 08-20-2013, 01:09 PM
  3. Basic Conditional Formatting
    By bighorn2 in forum Excel General
    Replies: 19
    Last Post: 04-24-2012, 05:27 PM
  4. Conditional formatting : Zeroes and blanks
    By tonywig in forum Excel General
    Replies: 3
    Last Post: 01-03-2008, 09:37 AM
  5. [SOLVED] visual basic conditional formatting produces strange results
    By Carl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2006, 10:10 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1