+ Reply to Thread
Results 1 to 9 of 9

Sumproduct that filters out errors vlaues

  1. #1
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Question Sumproduct that filters out errors vlaues

    I know how to create sumproduct formulas that have conditions (see below). But is there a way to create a sumproduct formula that only sums values that aren't errors?

    Here is my formula that accounts for 2 filters ("Americas" and D$6):
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    My data includes "#DIV/0!" errors in column T:T and I want to avoid those rows. Please tell me if I need to clarify.

    Thanks
    Last edited by Craig K.; 05-21-2013 at 03:52 PM. Reason: resolved the issue that necessitated the thread

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

    Re: Sumproduct that filters out errors vlaues

    I'm afraid sumproduct can't do that.

    Much better off adjusting the formulas in Column T to return a 0 instead of Div/0 errors.

    Or use an array formula enterd with CTRL + SHIFT + ENTER
    =SUM(IF(('5-8-13'!$E$2:$E$5000="Americas")*('5-8-13'!$H$2:$H$5000=Americas!D$6)*ISNUMBER('5-8-13'!$T$2:$T$5000),'5-8-13'!$T$2:$T$5000))

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

    Re: Sumproduct that filters out errors vlaues

    This arrayed function would also work

    =SUMPRODUCT(--($E$2:$E$5000="Americas")*($H$2:$H$5000=D$6)*IF(ISERROR($T$2:$T$5000),0,$T$2:$T$5000))
    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

  4. #4
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: Sumproduct that filters out errors vlaues

    Jonmo, the problem is that the values are coming from a SharePoint list download and I'm trying to avoid entering in arrayed functions.

    I had a hunch this would be the answer. Still had to aks though.

    Thanks.

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

    Re: Sumproduct that filters out errors vlaues

    Quote Originally Posted by Craig K. View Post
    Jonmo, the problem is that the values are coming from a SharePoint list download and I'm trying to avoid entering in arrayed functions.
    Then I'll go back to this point
    Quote Originally Posted by Jonmo1 View Post
    Much better off adjusting the formulas in Column T to return a 0 instead of Div/0 errors
    What is the formula in column T ?
    You can probably just add IFERROR to it

    =IFERROR(originalformulaincolumnT,0)

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

    Re: Sumproduct that filters out errors vlaues

    You can use the SUMIFS function:

    =SUMIFS('5-8-13'!$T$2:$T$5000,'5-8-13'!$T$2:$T$5000,"<1E100",'5-8-13'!$E$2:$E$5000,"Americas",'5-8-13'!$H$2:$H$5000,Americas!D$6)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: Sumproduct that filters out errors vlaues

    Problem was resolved by fixing the equations inside the SharePoint list. I also switched to using SUMIFS instead of SUMPRODUCT.

    marking this thread [solved] to close it out.

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

    Re: Sumproduct that filters out errors vlaues

    Glad to help, thanks for the feedback.

  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: Sumproduct that filters out errors vlaues

    Good deal. Thanks for the feedback!

+ 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