+ Reply to Thread
Results 1 to 3 of 3

SUM Returning 0, Calculation Set To Automatic and Cell Formatted as Number

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    49

    SUM Returning 0, Calculation Set To Automatic and Cell Formatted as Number

    I have this problem where the SUM function is returning 0. The context is this- I am simulating values using RAND() and looking up the values corersponding to probabilities from a different tables. I then use the TRIM function to return the value I need, and the final number is of a "general" format.

    This is the formula in the column I wish to sum:

    Please Login or Register  to view this content.
    And this is dragged down the column.

    When I change the cells using =VALUE(cell) the SUM function then returns the required value. Oddly the SUMPRODUCT function seems to work.

    Calculation is set to automatic and the cell has been formatted as a number. Can anyone explain what's happened please?

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: SUM Returning 0, Calculation Set To Automatic and Cell Formatted as Number

    that is because =TRIM(LEFT(AD1,FIND("-",AD1)-1)) returns text numbers
    just use any of these
    =TRIM(LEFT(AD1,FIND("-",AD1)-1))+0
    =TRIM(LEFT(AD1,FIND("-",AD1)-1))*1
    =--TRIM(LEFT(AD1,FIND("-",AD1)-1))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    10-29-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: SUM Returning 0, Calculation Set To Automatic and Cell Formatted as Number

    Ta, that's solved it!

+ 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] Returning a cell with a YES or No Calculation
    By scmuddy in forum Excel General
    Replies: 4
    Last Post: 11-11-2013, 12:19 PM
  2. Cell automatic calculation and email function
    By matelot09 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2012, 12:29 AM
  3. Replies: 6
    Last Post: 06-02-2009, 02:55 AM
  4. How do I return a number for a formatted cell value?
    By gmbhbls in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-15-2005, 09:55 AM
  5. [SOLVED] number formatted cell
    By Pam Coleman in forum Excel General
    Replies: 2
    Last Post: 06-02-2005, 04: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