+ Reply to Thread
Results 1 to 11 of 11

SUMPRODUCT with criteria ignoring errors in rage

  1. #1
    Forum Contributor
    Join Date
    05-01-2018
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    117

    SUMPRODUCT with criteria ignoring errors in rage

    Hello All

    I'm trying to find the best way to get a result as per below issue...
    I tried sumproduct with criteria however i got #N/A in rage and I just have no clue hot to solve this

    I need to get a sum of invoices for:

    737
    737NGM
    737NGM
    777

    from rage as per attached file

    Can you please advise

    Thank you
    KR
    Adam
    Attached Files Attached Files
    Last edited by adsako; 06-18-2018 at 05:28 AM.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: SUMPRODUCT with criteria ignoring errors in rage

    Are the #N/A records necessary?

    Resolving the errors is far easier and more efficient than trying to work around them.

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,921

    Re: SUMPRODUCT with criteria ignoring errors in rage

    Try this:

    =SUM(IF(LEFT($A$2:$A$47,LEN(G2))=G2&"",IF(ISNUMBER($C$2:$E$47),$C$2:$E$47)))

    Enter with Ctrl+Shift+Enter.

  4. #4
    Forum Contributor
    Join Date
    05-01-2018
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    117

    Re: SUMPRODUCT with criteria ignoring errors in rage

    Quote Originally Posted by jason.b75 View Post
    Are the #N/A records necessary?

    Resolving the errors is far easier and more efficient than trying to work around them.
    I guess you are right however there always will be situation (at least in my case) that error pops up so I was trying to find a solution to ignore errors

  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 with criteria ignoring errors in rage

    Try

    =SUMPRODUCT(SUMIFS($B$2:$B$47,$A$2:$A$47,$G$2:$G$5&"*",$B$2:$B$47,"<9.99999999999999E+307"))

  6. #6
    Forum Contributor
    Join Date
    05-01-2018
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    117

    Re: SUMPRODUCT with criteria ignoring errors in rage

    Quote Originally Posted by Phuocam View Post
    Try this:

    =SUM(IF(LEFT($A$2:$A$47,LEN(G2))=G2&"",IF(ISNUMBER($C$2:$E$47),$C$2:$E$47)))

    Enter with Ctrl+Shift+Enter.
    Hi, amazing ... works perfectly

  7. #7
    Forum Contributor
    Join Date
    05-01-2018
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    117

    Re: SUMPRODUCT with criteria ignoring errors in rage

    Quote Originally Posted by Jonmo1 View Post
    Try

    =SUMPRODUCT(SUMIFS($B$2:$B$47,$A$2:$A$47,$G$2:$G$5&"*",$B$2:$B$47,"<9.99999999999999E+307"))
    Hi,
    trying to understand this formula ....

    is there any was to use sumproduct with multiple criteria and at the same time ignore errors?

  8. #8
    Forum Contributor
    Join Date
    05-01-2018
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    117

    Re: SUMPRODUCT with criteria ignoring errors in rage

    Quote Originally Posted by adsako View Post
    Hi, amazing ... works perfectly
    It seems I was to quick with my enthusiasm
    formula returns 170,008.4445 for 737 however it should be 930,016.75

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

    Re: SUMPRODUCT with criteria ignoring errors in rage

    is there any was to use sumproduct with multiple criteria and at the same time ignore errors?
    Not that I'm aware of.

    the <9.99999999999999E+307 is saying only count numbers that are less than 9.99999999999999E+307 (the biggest number allowed in a cell, referred to as BIGNUM)
    This is what allows the sumifs function to ignore the errors because it's only looking for NUMBERS that are less than Bignum. Errors are NOT numbers.

    Then adding the sumproduct allows it to do multiple criteria (G2:G5) as an OR type of function.
    A simplified example
    =SUMPRODUCT(SUMIF(A1:A100,B1:B3,B1:B100))
    This would be the same as doing
    SUMIF(A1:A100,B1,B1:B100)+SUMIF(A1:A100,B2,B1:B100)+SUMIF(A1:A100,B3,B1:B100))

  10. #10
    Forum Contributor
    Join Date
    05-01-2018
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    117

    Re: SUMPRODUCT with criteria ignoring errors in rage

    Quote Originally Posted by Jonmo1 View Post
    Not that I'm aware of.

    the <9.99999999999999E+307 is saying only count numbers that are less than 9.99999999999999E+307 (the biggest number allowed in a cell, referred to as BIGNUM)
    This is what allows the sumifs function to ignore the errors because it's only looking for NUMBERS that are less than Bignum. Errors are NOT numbers.

    Then adding the sumproduct allows it to do multiple criteria (G2:G5) as an OR type of function.
    A simplified example
    =SUMPRODUCT(SUMIF(A1:A100,B1:B3,B1:B100))
    This would be the same as doing
    SUMIF(A1:A100,B1,B1:B100)+SUMIF(A1:A100,B2,B1:B100)+SUMIF(A1:A100,B3,B1:B100))
    Hi,
    apologies I was offline
    Thank you for support

    KR

  11. #11
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: SUMPRODUCT with criteria ignoring errors in rage

    See if this helps

    =SUMPRODUCT(IFERROR((SEARCH(G2,$A$2:$A$47)=1)*$C$2:$E$47,0))

    Array confirmed with Shift Ctrl Enter.

    Could you explain where you're getting your figure from in post #8? I can't see any way to get that result from the sample data.
    Last edited by jason.b75; 06-07-2018 at 06:51 AM.

+ 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: 10
    Last Post: 06-24-2014, 09:36 AM
  2. Sumproduct with multiple criteria and ignoring text values
    By soapy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-19-2014, 10:50 AM
  3. Sum rage = criteria range in sumifs function
    By mj1118888 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-15-2013, 12:25 PM
  4. [SOLVED] Ignoring errors in sumproduct/lookup formulas
    By dipique in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-03-2013, 12:27 PM
  5. [SOLVED] Ignoring errors
    By Cmorgan in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-16-2013, 05:05 AM
  6. Ignoring errors
    By JSALDUTTI in forum Excel General
    Replies: 1
    Last Post: 12-02-2010, 04:45 PM
  7. Ignoring text and errors with Sumproduct
    By SteveC in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-01-2006, 02:10 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