+ Reply to Thread
Results 1 to 9 of 9

why are these cells showing as NOT equal

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    why are these cells showing as NOT equal

    Hi, enclosed is a file.

    I dont understand why cells A2 and B2 are not equal.........

    can someone let me know?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,007

    Re: why are these cells showing as NOT equal

    Because they aren't!

    Change the cell formatting to general to see why:

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    2
    43691.19465
    43691.19464
    FALSE
    Sheet: Sheet1
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: why are these cells showing as NOT equal

    so i did as you mentioned changed formatting to general and you're correct they are not equal...........but do you know why they are not equal. if you look at the actual contents of the cells themselves......they are equal.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,007

    Re: why are these cells showing as NOT equal

    Nope!

    Excel 2016 (Windows) 32 bit
    A
    B
    2
    14/08/2019 04:40:17.4
    14/08/2019 04:40:17.0
    Sheet: Sheet1

    Custom formatting: dd/mm/yyyy hh:mm:ss.0

    The answer will lie in where they came from. They were not entered manually, obviously, otherwise there'd be no discrepancy. You can use rounding to overcome issues like this.
    Last edited by AliGW; 04-01-2021 at 10:37 AM.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,438

    Re: why are these cells showing as NOT equal

    I don't see anything in the file to tell us "why" they are not equal. Whatever data entry or importation or calculation scheme that generated these two values, they are different by a little less than half a second. Explain the data entry or calculation scheme, and we might be in a better position to say why they are different.

    At some point, I expect that your end goal is to figure out how to introduce some kind of rounding function (MROUND() to the nearest minute or second or whatever is appropriate) or test for "difference between is less than threshold" or something to account for the differences between two values that you clearly want to treat as if they are "equal".
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: why are these cells showing as NOT equal

    Quote Originally Posted by welchs101 View Post
    do you know why they are not equal. if you look at the actual contents of the cells themselves......they are equal.
    Not if you format them as Custom m/d/yyyy h:mm:ss.000 . A2 displays 8/14/2019 4:40:17.430 . B2 displays 8/14/2019 4:40:17.000 .

    B2 is the exact binary representation of the displayed time. A2 is not (!). It was probably calculated.

    BTW, the LEN function does not reflect the length of the date and time values. Those are just for appearances, due to formatting.

    Instead, the LEN function sees the actual internal value, formatted to 15 significant digits (rounded). That is, A2 is 43691.1946461806, and B2 is 43691.1946412037.

    See the attached file.
    Attached Files Attached Files
    Last edited by joeu2004; 04-01-2021 at 10:48 AM.

  7. #7
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: why are these cells showing as NOT equal

    thanks all.

    hey, i guess i am missing something because i see the following in BOTH cells

    "8/14/2019 4:40:17 AM"


    what am i doing wrong to see the difference

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,007

    Re: why are these cells showing as NOT equal

    Change the format of the cells to custom: mm/dd/yyyy hh:mm:ss.0

  9. #9
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,438

    Re: why are these cells showing as NOT equal

    i guess i am missing something because i see the following in BOTH cells -- "8/14/2019 4:40:17 AM"
    I don't know if this helps, but I think what you are missing is understanding that there is a difference between "what you see" and "the cell's actual value (a double precision floating point number)". I recall some early experience of my own (similar to yours in many ways) while learning spreadsheets that drove this home to me. I don't know how best to explain it, but a key concept for me to learn was that what I see in a cell is not the same thing as the underlying cell value. Further experience over time helped me come to understand different ways that the cell's value can differ from what I see. Dates and times are stark examples of this, as AliGW shows in post #2 where she shows the underlying double precision floating point numbers in those cells (to only 10 digits, so even those displayed values are not exactly the same as the full double precision value of the cell. Joeu shows those in post #6).

    Working on understanding the difference between what you see and the underlying cell value could be key to understanding this particular scenario.

+ 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] ¿ is showing instead of equal sign in excel
    By pick44 in forum Excel General
    Replies: 3
    Last Post: 09-04-2019, 06:24 PM
  2. [SOLVED] Macro for if cells with drop down list equal this, then other cells equal this
    By trubio77 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-20-2017, 07:39 PM
  3. Replies: 2
    Last Post: 09-11-2017, 03:42 PM
  4. Graph not showing data with equal steps
    By willem1102 in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 06-13-2017, 11:43 AM
  5. Replies: 2
    Last Post: 06-10-2017, 04:58 PM
  6. [SOLVED] Showing 2 cells as equal within a certain percentage
    By bishoposiris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2014, 03:34 PM
  7. [SOLVED] Counting cells in a column to add formulas to that equal number of cells
    By flipjarg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2012, 11:45 AM

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