+ Reply to Thread
Results 1 to 6 of 6

#VALUE! and #N/A return as 0

  1. #1
    Forum Contributor
    Join Date
    02-20-2010
    Location
    Youngstown, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    179

    #VALUE! and #N/A return as 0

    Is there any way to use a macro that returns a value of "0" in place of both #VALUE! and #N/A? I ask because I have a summing function that cannot work when either of these are in the summation. The only way to make it work is to delete the rows. Any ideas?

    Jim

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: #VALUE! and #N/A return as 0

    You can use this formula to sum a range and ignore any error values

    =SUM(SUMIF(A1:A100,{"<0",">0"}))

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: #VALUE! and #N/A return as 0

    How about this:

    =SUMIF(B:B, "<="&9.999999E+306)

  4. #4
    Forum Contributor
    Join Date
    02-20-2010
    Location
    Youngstown, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    179

    Re: #VALUE! and #N/A return as 0

    That worked great for the summing portion. But what if the cell equation looks as follows and you wanted to return a value of 0?:

    Please Login or Register  to view this content.
    or

    What if summing not a range but rather individual cells? The following happens to be a cell that when I delete on of the summation cells (L53), returns a value of #REF!.

    Please Login or Register  to view this content.


    Jim
    Last edited by cheddarthief; 04-12-2010 at 04:32 PM. Reason: additional information

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: #VALUE! and #N/A return as 0

    First solution would be to avoid errors. We would need more info (best would be example workbook) to see what cause and how avoid those errors.

    For product you can use this:

    =IF(ISERROR(C22*P22*Q22), 0, C22*P22*Q22)

    For SUM with non-series cells I would need more time...

  6. #6
    Forum Contributor
    Join Date
    02-20-2010
    Location
    Youngstown, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    179

    Re: #VALUE! and #N/A return as 0

    Any help with errors when either adding particular cells or multiply particular cells? I'm sure there is a variant to the above formula but I can't figure it out.

    Jim

+ 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