+ Reply to Thread
Results 1 to 5 of 5

SUMPRODUCT across multiple criteria and columns

  1. #1
    Registered User
    Join Date
    11-29-2007
    Posts
    22

    SUMPRODUCT across multiple criteria and columns

    Hi Guys,

    Hope you can help, I am trying to sum up a column based on a number of criteria, having trawled the forum for a while I am using the following formula but it is returning N/A:

    =SUMPRODUCT(('[data.xlsx]TY'!$A:$A=G15&J12&K1)*('[data.xlsx]TY'!$BC13:BM13=k2),'[data.xlsx]TY'!$BC21:$BM15309)

    The first part is looking at a row to see if it matches the criteria, the second part is looking a column t see if that also matches and the 3rd part should sum up the appropriate column

    Anyone spot where I'm going wrong?

    Much appreciated!

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

    Re: SUMPRODUCT across multiple criteria and columns

    You need the first range to match the rows in the last range, like this

    =SUMPRODUCT(('[data.xlsx]TY'!$A21:$A15309=G15&J12&K1)*('[data.xlsx]TY'!$BC13:BM13=k2),'[data.xlsx]TY'!$BC21:$BM15309)
    Audere est facere

  3. #3
    Registered User
    Join Date
    11-29-2007
    Posts
    22

    Re: SUMPRODUCT across multiple criteria and columns

    Hmm I still seem to be getting an N/A error

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

    Re: SUMPRODUCT across multiple criteria and columns

    OK, you needed the first change anyway......but in fact the mismatched ranges would give a #VALUE! error so #N/A indicates that you have #N/A values in some of the ranges, presumably in the sum range '[data.xlsx]TY'!$BC21:$BM15309

    Get rid of those and formula should work or you can make it work without eliminating them by using an array formula like this:

    =SUM(IF('[data.xlsx]TY'!$A21:$A15309=G15&J12&K1,IF('[data.xlsx]TY'!$BC13:BM13=k2,IF(ISNUMBER('[data.xlsx]TY'!$BC21:$BM15309),'[data.xlsx]TY'!$BC21:$BM15309))))

    confirmed with CTRL+SHIFT+ENTER

  5. #5
    Registered User
    Join Date
    11-29-2007
    Posts
    22

    Re: SUMPRODUCT across multiple criteria and columns

    Cracked it! Thanks a million dadylonglegs!!!!

+ 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