+ Reply to Thread
Results 1 to 3 of 3

Excluding #N/A results from a SUMPRODUCT

  1. #1
    Registered User
    Join Date
    01-16-2009
    Location
    Darlington, England
    MS-Off Ver
    Excel 2003
    Posts
    18

    Excluding #N/A results from a SUMPRODUCT

    Morning all!

    One last problem in my worksheet for me to overcome, and then I think I'm done with this asisgnment.

    Please Login or Register  to view this content.
    This is a formula I'm using, suggested by the simply wonderful Donkey, in figuring out in a illness report how many times a ***/illness/age and other equaility information appears. Now, a persons details may appear 2 or three times if they've had more than one illness, so the formula above shows how many people there are, so it doesn't count the same person twice.

    Works fine for the most part, except in the equality information. The information in the Master_Data is populated by a VLOOKUP and in some cases we don't have everyones equality data as they may not be on the main sheet that holds everyones details, so for example in some people it'll throw up the result '#N/A' as the details don't exist.

    These #N/A's stop the above calculation from working, so what I'm after is some way to do exactly what it does above, but ignore any incidents of an #N/A result. Is this possible?

    Thanks for your time and help, it is much appriciated!

    =I=

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Excluding #N/A results from a SUMPRODUCT

    Flattery gets you everywhere...

    You should adapt the VLOOKUP underpinning the formula such that #N/A is not returned

    A traditional approach would be:

    =IF(ISNUMBER(MATCH(A1,othersheet!A:A,0)),VLOOKUP(A1,othersheet!A:B,2,0),"")

    An alternative for returning a text value would be:

    =LOOKUP(REPT("Z",255),CHOOSE({1,2},"",VLOOKUP(A1,othersheet!A:B,2,0)))

  3. #3
    Registered User
    Join Date
    01-16-2009
    Location
    Darlington, England
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Excluding #N/A results from a SUMPRODUCT

    You my friend, are not only a lifesaver, but a living legend. Works perfectly now, resolved the issue immediately.

    My thanks as always, I couldn't of got through this placement without your help. Thank you dearly.

    =I=

+ 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