+ Reply to Thread
Results 1 to 3 of 3

Conditional formatting not working with cell

  1. #1
    Registered User
    Join Date
    04-25-2021
    Location
    Northern Ireland
    MS-Off Ver
    excel 365
    Posts
    2

    Conditional formatting not working with cell

    Hi

    New here and was wondering if someone could help me with formatting of cells on a spreadsheet.

    I am running into problems when i try a make a cell go red when a value has been worked out with a formula.

    I am wanting the cell to go red if its +/- 0.30 but for some reason when the value returns +/- 0.31 its still green but then turns red when it goes to +/- 0.32.
    The formatting seems to work fine if you just type 0.31 but for some reason when the formula works it out it doesn't like it.
    Sorry i am new to this sort of stuff and its probably pretty basic when you know how :P

    Thanks in Advance
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Conditional formatting not working with cell

    It is called "floating points" in Excell (try to google it to study)
    0.31 actually is 0.30999999999999
    Try to test by input 28.31 in K3; 28 in K4 then K5=K3-K4, increase decimal enought to see its actual value is 0.3099999999999
    It would not happen to other value,i.e, 0.32
    to prevent it, in conditional formating: try = -0.30999999999 instead of -0.31
    Attached Images Attached Images
    Quang PT

  3. #3
    Registered User
    Join Date
    04-25-2021
    Location
    Northern Ireland
    MS-Off Ver
    excel 365
    Posts
    2

    Re: Conditional formatting not working with cell

    That worked perfectly.

    Thanks very much and will do some more research into floating points

+ 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 not working on one particular cell value
    By Hanleymomma in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-25-2021, 08:54 AM
  2. Replies: 7
    Last Post: 03-10-2021, 12:01 PM
  3. [SOLVED] Conditional Formatting of a row based on cell not working
    By Bridger18 in forum Excel General
    Replies: 5
    Last Post: 01-21-2021, 02:38 AM
  4. Conditional Formatting not working on cell that has formula
    By ely.rodriguez in forum Excel General
    Replies: 8
    Last Post: 09-26-2017, 02:16 PM
  5. Conditional cell formatting not working properly
    By luv2glyd in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-06-2017, 12:49 AM
  6. Conditional Formatting not working for single cell
    By berdar in forum Excel General
    Replies: 3
    Last Post: 01-06-2013, 11:33 AM
  7. conditional formatting not working in every cell
    By mhutch71 in forum Excel General
    Replies: 3
    Last Post: 01-04-2006, 04:25 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