+ Reply to Thread
Results 1 to 11 of 11

add multiple cells ignoring #n/a cells

  1. #1
    Registered User
    Join Date
    07-02-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    add multiple cells ignoring #n/a cells

    I have a spreadsheet that needs a running total at different points in the year. The formula in the cells returns #n/a when it has no value. Is it possible to use a formula that will ignore the #n/a value and still return a number.

    example

    a1 = 10
    a2 = #n/a
    a3 = #n/a
    a4 = #n/a
    a5 should return 10

    then

    a1 = 10
    a2 = 2
    a3 = #n/a
    a4 = #n/a
    a5 should return 12

    Any help would be greatly appreciated.
    Thanks in advance

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: add multiple cells ignoring #n/a cells

    =sumif(a1:a4,"<>#n/a")
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Registered User
    Join Date
    07-02-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: add multiple cells ignoring #n/a cells

    thank you so much for the quick reply. Worked a treat!

  4. #4
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: add multiple cells ignoring #n/a cells

    You are welcome.

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

    Re: add multiple cells ignoring #n/a cells

    Here's another way...

    If there won't be any negative numbers in the range:

    =SUMIF(A1:A4,">0")

    If there might be negative numbers in the range:

    =SUMIF(A1:A4,"<1E100")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Registered User
    Join Date
    07-02-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: add multiple cells ignoring #n/a cells

    just on the off chance, is it possible to add a formula to a cell's original formula that will stop #n/a showing?
    Thanks in advance

  7. #7
    Registered User
    Join Date
    07-02-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: add multiple cells ignoring #n/a cells

    Thank you Tony as well...I really have a lot to learn!!!

  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: add multiple cells ignoring #n/a cells

    Yeah, me too!

    You're welcome!

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

    Re: add multiple cells ignoring #n/a cells

    Yes.

    Without seeing the formula, a generalized method that returns a blank instead of an error:

    =IFERROR(your formula here,"")

  10. #10
    Registered User
    Join Date
    07-02-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: add multiple cells ignoring #n/a cells

    Hi Tony,

    This is what is in one of the cells

    =VLOOKUP(M6,Lookup!$C$4:$D$40,2,FALSE)

    I have tried to add it to the generalized method but it doesn't seem to work
    Thanks for any help

  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: add multiple cells ignoring #n/a cells

    Try it like this...

    =IFERROR(VLOOKUP(M6,Lookup!$C$4:$D$40,2,0),"")

    The 0 is a shorthand equivalent of FALSE.

+ 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. Replies: 5
    Last Post: 01-24-2013, 06:29 AM
  2. Ignoring specific values while selecting multiple cells
    By HelpThisPoorChap in forum Excel General
    Replies: 5
    Last Post: 12-20-2012, 03:42 PM
  3. Sum of a set of cells, ignoring the minimum
    By xlsnoob in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2011, 01:17 PM
  4. Averaging non continuous cells, and ignoring cells with errors
    By bog3494 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2008, 02:06 PM
  5. Ignoring Empty Cells
    By cheshajim in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2007, 12:27 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