Consulting

Results 1 to 5 of 5

Thread: Sum on the basis of multiple creterias

  1. #1
    VBAX Contributor
    Joined
    Jul 2017
    Posts
    110
    Location

    Sum on the basis of multiple creterias

    Hi,

    Looking for forumla which will sum mynumbers on the basis of mutiple creteris mentioned in sheet 1 and then sum of YTD n sheet .

    Tryng to use sumproduct,can anyoe suggest anything please

    Thank you
    Attached Files Attached Files

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    =SUMPRODUCT(((A2:A23=A29)+(A2:A23=A30)+(A2:A23=A31))*(B2:B23=B29)*(C2:C23=C29)*D2:O23)
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    could you try the =SUMIFS formula?

  4. #4
    VBAX Contributor
    Joined
    Jul 2017
    Posts
    110
    Location
    Thanks p45cal...and what about if we only want YTD sum only.....@S.White Sumifs whould not work

  5. #5
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    =SUMPRODUCT(((A2:A23=A29)+(A2:A23=A30)+(A2:A23=A31))*(B2:B23=B29)*(C2:C23=C29)*OFFSET(D2:O23,0,0,,MATCH(F30,$D$1:$O$1,0)))
    or
    =SUMPRODUCT(((A2:A23=A29)+(A2:A23=A30)+(A2:A23=A31))*(B2:B23=B29)*(C2:C23=C29)*OFFSET(D2:O23,0,0,,MATCH(TEXT(TODAY(),"mmm"),$D$1:$O$1,0)))
    or
    =SUMPRODUCT(((A2:A23=A29)+(A2:A23=A30)+(A2:A23=A31))*(B2:B23=B29)*(C2:C23=C29)*$D$2:$D$23:INDEX($D$2:$O$23,0,MATCH(F30,$D$1:$O$1,0)))
    or
    =SUMPRODUCT(((A2:A23=A29)+(A2:A23=A30)+(A2:A23=A31))*(B2:B23=B29)*(C2:C23=C29)*$D$2:$D$23:INDEX($D$2:$O$23,0,MATCH(TEXT(TODAY(),"mmm"),$D$1:$O$1,0)))
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •