+ Reply to Thread
Results 1 to 11 of 11

#NUM error when adding together cells that are formulas

  1. #1
    Registered User
    Join Date
    07-16-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    25

    #NUM error when adding together cells that are formulas

    Hi,

    I am trying to add 4 cells together. All four of the cells are formulas themselves for other parts in the spreadsheet. 2 of the cells are straightforward, the other 2 I want to select the largest out of 2 other cells to add.

    So I want to select the largest from either E4 and H4, the largest from O4 and L4 and then add AI4 and BC4.

    Here is the formula I am using:

    =SUM(LARGE((E4,H4),1),LARGE((L4,O4),1),AI4,BC4)

    This returns #NUM. Is it because all of those cells are formulas of their own and the final sum is not recognizing them as values?

    Thanks for any help

    :-)

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: #NUM error when adding together cells that are formulas

    To sum the largest, use MAX, not LARGE
    =SUM(MAX(E4,H4), MAX(L4,O4), AI4, BC4)

    Large is used with a continuous range

    =LARGE(E4:E5,1) or
    LARGE(E4:H4,1)
    Last edited by ChemistB; 07-21-2014 at 08:10 AM.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-16-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    25

    Re: #NUM error when adding together cells that are formulas

    Quote Originally Posted by ChemistB View Post
    To sum the largest, use MAX, not LARGE
    =SUM(MAX(E4,H4), MAX(L4,O4), AI4, BC4)

    Large is used with a continuous range

    =LARGE(E4:E5,1) or
    LARGE(E4:H4,1)
    Works perfectly, thanks :-)

  4. #4
    Registered User
    Join Date
    07-16-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    25

    Re: #NUM error when adding together cells that are formulas

    It seems I replied too early! It is no longer saying #NUM but for some reason it is not adding up the highest number in the MAX range. It has added up the other two only.

    To test it I inserted a new column and put the formula =MAX(E4,H4) and it returned 0 even though E4=31 and H4=68.

    Any ideas why?

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

    Re: #NUM error when adding together cells that are formulas

    Sounds like E4 and H4 are not really numbers.
    They're 'Numbers Stored As Text'

    You said those cells are also the result of another formula?
    Can you post those formulas?

  6. #6
    Registered User
    Join Date
    07-16-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    25

    Re: #NUM error when adding together cells that are formulas

    Yes, I think this is where the issue lies. Those cells are the result of an IF formula and I guess it is set up as text because of the "". Is there anyway of changing it to be a number without losing the formula?

    =IF(F4<12,"0", IF(F4=12,"36", IF(F4=13,"38", IF(F4=14,"40", IF(F4=15,"43", IF(F4=16,"46", IF(F4=17,"48", IF(F4=18,"51", IF(F4=19,"53", IF(F4=20,"56", IF(F4=21,"58", IF(F4=22,"60", IF(F4=23,"62", IF(F4=24,"64", IF(F4=25,"65", IF(F4=26,"68", IF(F4=27,"70", IF(F4=28,"72", IF(F4=29,"73", IF(F4=30,"73", IF(F4=31,"74", IF(F4=32,"74", IF(F4=33,"75", IF(F4=33,"75", IF(F4=34,"75", IF(F4=35,"76", IF(F4=36,"76", IF(F4=37,"77", IF(F4=38,"78", IF(F4=39,"79", IF(F4=40,"80",)))))))))))))))))))))))))))))))

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

    Re: #NUM error when adding together cells that are formulas

    Remove all the " from around the numbers.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: #NUM error when adding together cells that are formulas

    Quote Originally Posted by ChemistB View Post
    To sum the largest, use MAX, not LARGE
    =SUM(MAX(E4,H4), MAX(L4,O4), AI4, BC4)

    Large is used with a continuous range

    =LARGE(E4:E5,1) or
    LARGE(E4:H4,1)
    The LARGE/SMALL functions will accept multiple area references:

    =LARGE((E4,H4),1)

    =SMALL((A1:A5,B10:B15),1)

    Although MAX/MIN will do the same thing and they're shorter.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  9. #9
    Registered User
    Join Date
    07-16-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    25

    Re: #NUM error when adding together cells that are formulas

    Got it thanks.

    I think LARGE will have worked had the " not been around the numbers in the original formulas. It didn't recognize the value of E4 and H4 as it was 'numbers as text'.

  10. #10
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: #NUM error when adding together cells that are formulas

    Thanks Tony, I had tried it using {} and not (). I'm never sure when Excel wants us to use one or the other within a given function.

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: #NUM error when adding together cells that are formulas

    ______

+ 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. Adding Formulas to Last Cells in Groups
    By djacobsen21 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-07-2013, 12:08 PM
  2. Replies: 5
    Last Post: 11-10-2009, 07:06 AM
  3. [SOLVED] Adding formulas to cells
    By Jordan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-16-2006, 11:30 PM
  4. Adding cells that already have formulas
    By critter in forum Excel General
    Replies: 2
    Last Post: 09-28-2005, 02:05 AM
  5. [SOLVED] adding cells that contain formulas that have returned error messag
    By Daniel R in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-21-2005, 04:06 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