+ Reply to Thread
Results 1 to 6 of 6

Conditional formatting anomaly....

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Conditional formatting anomaly....

    I'm applying some conditional formatting so that the number in H2 should be blue if it is above zero , green at zero , and red below zero.

    This works fine if the number in D2 is a single number , but it fails to work if D2 contains a formula giving the same number. This is really puzzling. Can anyone advise as to why this should be?

    I'll attach my file.

    Grateful for any help.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Conditional formatting anomaly....

    Hi CD,

    The answer is rounding errors in Excel. Format column H to show 20 decimal places and you will see that row 2 is negative and row 3 is really zero. You could use a round to 2 decimal places and see if that solves your CF problem.

    Marv
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Re: Conditional formatting anomaly....

    Ok thanks for your help.

    I can see that on expanding the cell to 20 places that the number is curiously a negative.

    Rounding to two places doesn't seem to make any difference to the reaction of the conditional formatting as the underlying figure is still being viewed as negative.

    I can't see a way of forcing it to read it as two places and therefore apply the correct formatting.

    Maybe you could advise if a formula in the CF interface would have the desired effect.

    Presently , I'm applying identical CF to cells both showing the same output , and am getting different responses...

  4. #4
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Conditional formatting anomaly....

    I put the following formula in H2, and it changed the formatting to green, which is what I believe your goal is:
    Please Login or Register  to view this content.
    However, I'm baffled by the negative result in the original formula.

  5. #5
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Conditional formatting anomaly....

    After poking around a little bit, I found this site that explains the weird math:

    https://www.atlaspm.com/toms-tutoria...ding-up-wrong/

    Hopefully this doesn't violate any link posting rules.

  6. #6
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Re: Conditional formatting anomaly....

    It's certainly very curious , but using ROUND does correct the issue. Thanks for your help.
    Last edited by CDandVinyl; 03-12-2019 at 06:55 PM.

+ 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] Big date anomaly
    By heytherejem in forum Excel General
    Replies: 2
    Last Post: 02-26-2018, 12:17 PM
  2. Another counting anomaly
    By Alan Beban in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2018, 07:22 PM
  3. [SOLVED] Formula anomaly
    By Mulpuzzle in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 07-29-2016, 12:14 AM
  4. [SOLVED] INDIRECT problem for anomaly detection with conditional formatting
    By eyestorm in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-07-2014, 11:45 AM
  5. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  6. IF function anomaly
    By BBS in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-07-2007, 11:51 AM
  7. [SOLVED] Formatting Anomaly
    By Christopher Weaver in forum Excel General
    Replies: 2
    Last Post: 05-13-2005, 06:06 PM

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