Consulting

Results 1 to 4 of 4

Thread: Adding two columns together with two criteria

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Contributor
    Joined
    Oct 2013
    Posts
    181
    Location

    Adding two columns together with two criteria

    I would like to have a formula that will add together data from two different worksheets. The below SUMPRODUCT formula works well for finding the data with two criteria on one sheet but I need a way to combine the two formulas together so the result would be the total from the both formulas.

    Hope this make sense! Thank you for any and all help

    SUMPRODUCT(--(Sheet1!$A2:$A10000=$A3),--( Sheet1!$B2:$B10000=B$1),--( Sheet1!$C2:$C10000))
    SUMPRODUCT(--(Sheet2!$A2:$A10000=$A3),--( Sheet2!$B2:$B10000=B$1),--( Sheet2!$C2:$C10000))
    
    example:
    SUMPRODUCT(--(Sheet1!$A2:$A10000=$A3),--( Sheet1!$B2:$B10000=B$1),--( Sheet1!$C2:$C10000))+SUMPRODUCT(--(Sheet2!$A2:$A10000=$A3),--( Sheet2!$B2:$B10000=B$1),--( Sheet2!$C2:$C10000))

  2. #2
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,709
    Location
    Moderator Bump
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,446
    Location
    What is wrong with the formula that you gave, does it not do what you ask?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    VBAX Contributor
    Joined
    Oct 2013
    Posts
    181
    Location
    It does, that is why I marked the post Solved but thank you for checking back with a solution.

Posting Permissions

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