+ Reply to Thread
Results 1 to 13 of 13

Sumproduct for multiple criteria across columns and rows

  1. #1
    Registered User
    Join Date
    11-25-2013
    Location
    Brisbane, Qld
    MS-Off Ver
    Office365
    Posts
    13

    Sumproduct for multiple criteria across columns and rows

    Hi,

    I've not used SUMPRODUCT previously and can't understand how to get results for the attached. I'm hoping someone will find this pretty easy to solve!

    I've tried SUMIFS but it doesn't work because I'm looking down columns and across rows, I'm assuming.

    I've attached a summary of what I'm trying to achieve. I want to sum all costs with an R,P,I,G, etc. in column C for December '13 (E3) in the top table.

    The second table is actually in a different sheet but is the source of the data I need added.

    Any help would be greatly appreciated!

    Many thanks
    Stuart
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Sumproduct for multiple criteria across columns and rows

    hi Stuart. what you could do to illustrate better is to manually key in the numbers you wish to see. and tell us how you got them. my guess is this in E7:
    =SUMIF(C20:C24,C7,INDEX($G$20:$R$24,,MATCH(E$3,$G$17:$R$17,0)))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    11-25-2013
    Location
    Brisbane, Qld
    MS-Off Ver
    Office365
    Posts
    13

    Re: Sumproduct for multiple criteria across columns and rows

    Hi benishiryo,

    That gives the result I'm after.

    I'm just working through understanding the basis of the formula so I can use it in the future, if needed.

    Thank you very much for your quick response

  4. #4
    Forum Contributor
    Join Date
    11-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007,2013
    Posts
    159

    Re: Sumproduct for multiple criteria across columns and rows

    Hi Yacatac,

    Using SUMPRODUCT:

    =SUMPRODUCT(($C$20:$C$24=$C7)*($G$17:$R$17=$E$3)*$G$20:$R$24)

    copy and paste in E7 to E10.


    If this post helped please click ADD REPUTATION left below of this post
    Click * below if this answer helped

  5. #5
    Registered User
    Join Date
    11-25-2013
    Location
    Brisbane, Qld
    MS-Off Ver
    Office365
    Posts
    13

    Re: Sumproduct for multiple criteria across columns and rows

    OK, now I realise I also need to sum to the date in E3 based on the above assumptions. e.g. R will equal 2,345, P will equal 2,395 and will need this to change dependant on the date in E3.

    TIA

  6. #6
    Registered User
    Join Date
    11-25-2013
    Location
    Brisbane, Qld
    MS-Off Ver
    Office365
    Posts
    13

    Re: Sumproduct for multiple criteria across columns and rows

    Thank you reimar-rem that works too

  7. #7
    Forum Contributor
    Join Date
    11-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007,2013
    Posts
    159

    Re: Sumproduct for multiple criteria across columns and rows

    Hi

    In E7 to E10

    Paste:

    =SUMPRODUCT(($C$20:$C$24=$C7)*(RIGHT(TEXT($G$17:$R$17,"YYY"),2)="13")*$G$20:$R$24)

    If this post helped please click ADD REPUTATION left below of this post

  8. #8
    Forum Contributor
    Join Date
    11-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007,2013
    Posts
    159

    Re: Sumproduct for multiple criteria across columns and rows

    hI

    and will need this to change dependant on the date in E3.
    If you want E3 to be dependent used this in E7:E10

    =SUMPRODUCT(($C$20:$C$24=$C7)*($G$17:$R$17<=$E$3)*$G$20:$R$24)


    If this post helped please click ADD REPUTATION left below of this post

  9. #9
    Registered User
    Join Date
    11-25-2013
    Location
    Brisbane, Qld
    MS-Off Ver
    Office365
    Posts
    13

    Re: Sumproduct for multiple criteria across columns and rows

    Quote Originally Posted by reimar_rem View Post
    hI



    If you want E3 to be dependent used this in E7:E10

    =SUMPRODUCT(($C$20:$C$24=$C7)*($G$17:$R$17<=$E$3)*$G$20:$R$24)


    If this post helped please click ADD REPUTATION left below of this post

    If you want E3 to be dependent used this in E7:E10

    =SUMPRODUCT(($C$20:$C$24=$C7)*($G$17:$R$17<=$E$3)*$G$20:$R$24)


    If this post helped please click ADD REPUTATION left below of this post[/QUOTE]

    Thanks for this, I managed to get to that stage myself - luckily!!

    I have a problem though when transferring to my actual sheets. When I change the formula to suit the different source sheet, I can only reference from A11:A190 when I need to get to A288. Is there a limit on the number of rows which can be used? I keep getting a value error. I'm keeping the lookup range and data range the same to the same row numbers, e.g. $C$11:$C$288 and $G$11:$R$288
    and the date range lookup is $G$10:$R$10.

    I hope that makes sense?

    Thanks

  10. #10
    Forum Contributor
    Join Date
    11-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007,2013
    Posts
    159

    Re: Sumproduct for multiple criteria across columns and rows

    Hi,

    Is there a limit on the number of rows which can be used?
    I don't think there is a limit as to rows.

    Can you attach your file here?

  11. #11
    Registered User
    Join Date
    11-25-2013
    Location
    Brisbane, Qld
    MS-Off Ver
    Office365
    Posts
    13

    Re: Sumproduct for multiple criteria across columns and rows

    Apologies for the delay. File attached.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    11-25-2013
    Location
    Brisbane, Qld
    MS-Off Ver
    Office365
    Posts
    13

    Re: Sumproduct for multiple criteria across columns and rows

    Solved the problem. The referencing cells had formulae that was pointing to blank cells, therefore no value was coming through and the SUMPRODUCT formula wouldn't work. All sorted now thanks.

  13. #13
    Registered User
    Join Date
    08-12-2015
    Location
    Amsterdam
    MS-Off Ver
    2010
    Posts
    4

    Re: Sumproduct for multiple criteria across columns and rows

    Quote Originally Posted by reimar_rem View Post
    Hi Yacatac,

    Using SUMPRODUCT:

    =SUMPRODUCT(($C$20:$C$24=$C7)*($G$17:$R$17=$E$3)*$G$20:$R$24)

    copy and paste in E7 to E10.


    If this post helped please click ADD REPUTATION left below of this post

    How would you use this exact formula across different sheets? For instance, Sheet 1 to 4.
    I am a bit familliar with the INDIRECT fuction but have been stuck for more than a day on this issue.

    Would appreciate any help, tnx
    Last edited by xavier_; 08-12-2015 at 07:50 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. Sumif or Sumproduct with Multiple Rows & Columns
    By vulches in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-12-2017, 02:06 AM
  2. [SOLVED] Need to use either COUNTIFS or SUMPRODUCT to count rows based on multiple criteria
    By erabinov in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-15-2013, 03:15 PM
  3. [SOLVED] SUMPRODUCT across multiple criteria and columns
    By richardj in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-26-2012, 05:50 PM
  4. Replies: 1
    Last Post: 05-18-2009, 11:21 AM
  5. Sumproduct Multiple Worksheets, Columns and Rows
    By PeterW in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-06-2007, 10:02 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