+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Why would SUM(range) function not add ".5"

  1. #1
    Registered User
    Join Date
    04-01-2011
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Why would SUM(range) function not add ".5"

    I'm trying to add a row of 7 cells. When I use the =SUM(C32:I32) formula I don't get the correct answer. It's not adding one of the cells which has a value of .5

    If I use =SUM(C32+D32+E32+F32+G32+H32+I32) it adds it all up just fine.

    All cell formatting is General. The first formula will add the decimal if it's greater than 1. So it will add up 1.5 but not .5

    Some additional info that may help is that the ".5" is not actually entered. That value is calculated from a VLOOKUP formula. If I delete the formula and simply type in .5 the original formula works but Excel adds a preceding "0" in front of the decimal. "0.5" is what is actually displayed. I don't want this because there are a ton of numbers on the worksheet and I need it as simple and uncluttered as I can get it. If the second formula works with just .5 then at least I know the ".5" is recognized as a number and doesn't need the preceeding zero. Why does individual cell addition differ from range addition???

    I'm sure this is a very elementary problem, but for the life of me I can't figure it out.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,454

    Re: Why would SUM(range) function not add ".5"

    If you're seeing .5 rather than 0.5, then the VLOOKUP is returning *text* that looks like a number but isn't (always) treated as a number. Some calculations will force the numeric value, others will ignore it. Try using --VLOOKUP(...)


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Why would SUM(range) function not add ".5"

    If you are returning .5 and not 0.5 then it is text. The SUM() function ignores text, the other one works because the SUM is not doing the adding, it is the +'s that are "coercing" the text numbers to real numbers.

    If you don't want to change things with the results and want to use a range, try:

    =SUMPRODUCT(--(C32:F32))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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