+ Reply to Thread
Results 1 to 18 of 18

Decimal Function

Hybrid View

  1. #1
    Registered User
    Join Date
    07-21-2010
    Location
    Kuwait, Hawally
    MS-Off Ver
    Microsoft Office 2019
    Posts
    28

    Re: Decimal Function

    Always I used number with 3 decimals, for example:
    62.500
    62.500
    26.738
    26.350
    62.500
    62.500
    Total is: 303.088

    I used this function in seperate cell: =INT(SUM(A1:A6)) it gives me 303 (It's correct)
    Then I used your functions which you gave it to me in other cell to show me only decimals:
    =TEXT(MOD(SUM(A1:A6),1)*1000,"000")
    or
    =REPLACE(TEXT(MOD(SUM(A1:A6),1),".000"),1,1,"")
    The result is: 087 (not correct), the right result should be: 088

    Please for quick help.

    Thank.

    Best Regards,

    Mostafa Saqallah

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Decimal Function

    As I said - post a sample - ie a file.

    Those specific values would generate 088 therefore I suspect the cells (A1:A6) are in fact simply formatted to 3 decimal places.
    As a result of which you are experiencing roundings, however, to verify to be the case we need to see a file containing the exact values you're summing.

    To elaborate - a cell containing the value 62.49999999 formatted to 3 decimals will appear as 62.500 ... however when summed it is the underlying value that is used and not the formatted value*

    The below

    62.4999	62.500
    62.4999	62.500
    26.7381	26.738
    26.3497	26.350
    62.4999	62.500
    62.4999	62.500
    the values to the left would generate 087 for ex. even though the formatted values (right) would appear to total 088

    If this is the issue we can account for it - but we need to see the file to be sure.

    *unless using Precision as Displayed - not generally recommended
    Last edited by DonkeyOte; 07-28-2010 at 01:46 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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