+ Reply to Thread
Results 1 to 17 of 17

SUM for numbers with point decimals results in 0

  1. #1
    Registered User
    Join Date
    02-25-2015
    Location
    Sweden
    MS-Off Ver
    14.0.6023.1000 (32-bit)
    Posts
    8

    SUM for numbers with point decimals results in 0

    Hi,

    In the attached file you can see that I'm trying to perform a SUM on column H. You will find the formula on H5. I'm simply trying to perform a SUM on column HS for the values in H2, H3 and H4 that should result in "3.30". A very simple operation. Somehow the result is 0. I have checked that all cells are not set as "Text" or some other strange format and tried many other options. I have also tried to perform the operation with the built-in funtion "AutoSum" and of some reason it selects the wrong cells.

    This should be a very simple task. I wonder why I'm having such problems. Any help is much appreciated.

    Br
    Edvard

    test.xlsx

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: SUM for numbers with point decimals results in 0

    H2 H3 H4 are left justified
    That means they are text, hence the zero result.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  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,430

    Re: SUM for numbers with point decimals results in 0

    i don't see wha version of Excel you are using, but the numbers ARE stored as text, Do you see a small green triangle in the top left corner of the cells? Ifso,select the cells, and click on the exclamation mark in the yellow diamond to convert to numbers.
    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
    Registered User
    Join Date
    02-25-2015
    Location
    Sweden
    MS-Off Ver
    14.0.6023.1000 (32-bit)
    Posts
    8

    Re: SUM for numbers with point decimals results in 0

    Hi,

    Thanks for the fast replies.

    The version I'm using is 14.0.6023.1000 (32-bit)

    I have set numbers to be justified to the right and the cells are set as "General", not as "Text". Either way, I have changed the cells to "Number" and the only visible changes, is that sum is now presented as "0,00" instead of "0".

    I can't see any green triangles or exclamation marks/warning texts whatsoever. I have seen them in other files so I know how they like like, but not in this one.

    To sum it up, I'm stuck as before.

    Br
    Edvard

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUM for numbers with point decimals results in 0

    Changing the 'Format' of cells from General to Number (or anything) doesn't change the actual value in the cell.
    And just becaue the cell is Formatted as a Number, doesn't mean that cell actually 'Contains' a Number.
    A cell formatted as Number CAN contain a Text Value.
    If you type "Hello" into a cell, and then change that cell's format to 'Number', doesn't make "Hello" change to a number.

    The 'Values' in the cells are NOT real numbers.
    They are called 'Numbers Stored As Text'

    If you don't see the green triangle, it likely means that option is turned off in Excel Options - Formulas, "Enable background error checking"


    Another method to convert them from 'Numbers stored as text' to real numbers..
    Highlight the column
    Data - Text to Columns
    Deliminated - Next
    UNcheck all options - Finish.

  6. #6
    Registered User
    Join Date
    02-25-2015
    Location
    Sweden
    MS-Off Ver
    14.0.6023.1000 (32-bit)
    Posts
    8

    Re: SUM for numbers with point decimals results in 0

    Jonmo1,

    Thanks for the explanation.

    If you don't see the green triangle, it likely means that option is turned off in Excel Options - Formulas, "Enable background error checking"

    This is already enabled.


    Another method to convert them from 'Numbers stored as text' to real numbers..
    Highlight the column
    Data - Text to Columns
    Deliminated - Next
    UNcheck all options - Finish.


    Tried this as well. No change.

    Br
    Edvard

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: SUM for numbers with point decimals results in 0

    Try this formula sum values in column H

    =SUMPRODUCT(--(H2:H10))
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  8. #8
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: SUM for numbers with point decimals results in 0

    Another way to convert to a number: Multiply H2 by 1. Copy down and do your =SUM.
    Pete

  9. #9
    Registered User
    Join Date
    02-25-2015
    Location
    Sweden
    MS-Off Ver
    14.0.6023.1000 (32-bit)
    Posts
    8

    Re: SUM for numbers with point decimals results in 0

    =SUMPRODUCT(--(H2:H10))

    Tryhing this formula I'm getting the following Warning:

    "A value used in this formula is of the wrong data type"

    Just wondering which and how?

    Br
    Edvard

  10. #10
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: SUM for numbers with point decimals results in 0

    Quote Originally Posted by emw View Post
    =SUMPRODUCT(--(H2:H10))

    Tryhing this formula I'm getting the following Warning:

    "A value used in this formula is of the wrong data type"

    Just wondering which and how?

    Br
    Edvard
    Please see attached file
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    02-25-2015
    Location
    Sweden
    MS-Off Ver
    14.0.6023.1000 (32-bit)
    Posts
    8

    Re: SUM for numbers with point decimals results in 0

    I have attached a picture regarding the calculation steps and noticed that the numbers are within "". Is that really correct?

    Are the content within the cells still interpreted as "Text"?

    Br
    Edvardexcel-error.png

  12. #12
    Registered User
    Join Date
    02-25-2015
    Location
    Sweden
    MS-Off Ver
    14.0.6023.1000 (32-bit)
    Posts
    8

    Re: SUM for numbers with point decimals results in 0

    AlKey,

    Downloaded your file and saw that the formula is working. But as soon as I update any number on the current cells, the formula spits out the same Warning as before. I don't get it.

    Br
    Edvard

  13. #13
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUM for numbers with point decimals results in 0

    I bet your regional settings have comma as the decimal seperator.

    What if you type in the values as
    1,10

    and try

    =SUMPRODUCT(--(SUBSTITUTE(H2:H4;".";",")))
    This is meant to be tested prior to changing . to ,
    Last edited by Jonmo1; 02-25-2015 at 11:24 AM.

  14. #14
    Registered User
    Join Date
    02-25-2015
    Location
    Sweden
    MS-Off Ver
    14.0.6023.1000 (32-bit)
    Posts
    8

    Re: SUM for numbers with point decimals results in 0

    Jonmo1,

    There you have it! Now the formula is working correctly as soon as I change to ","

    The things is that all the numbers and data that I have are using "." How do I change this setting?

    Br
    Edvard

  15. #15
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUM for numbers with point decimals results in 0

    Quote Originally Posted by emw View Post
    How do I change this setting?
    In Windows, it's in Control Panel - Regional Settings - Additional Settings.

  16. #16
    Registered User
    Join Date
    02-25-2015
    Location
    Sweden
    MS-Off Ver
    14.0.6023.1000 (32-bit)
    Posts
    8

    Re: SUM for numbers with point decimals results in 0

    Jonmo1,

    Applied the change and now everything is working perfectly.

    Big thanks for the help! Much appreciated.

    Br
    Edvard

  17. #17
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUM for numbers with point decimals results in 0

    You're welcome.

+ 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. Rounding (removing decimals) from Pivot Table results
    By CBJason in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 02-13-2014, 06:00 PM
  2. [SOLVED] Convert all numbers stored as text or custom formatted to numbers &no decimals - 40 sheets
    By synses in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2013, 01:46 AM
  3. About decimals numbers
    By RazBoss in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2009, 02:39 PM
  4. Numbers have too many decimals
    By stev49 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-18-2009, 07:01 AM
  5. Rounding results to nearest quarter (in decimals)
    By djarcadian in forum Excel General
    Replies: 5
    Last Post: 10-26-2005, 08:05 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