• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Sums based on mulitple conditions

shani1975

New Member
Hi, I have listed what I am looking for in the attached sheet! Thanks in advance!!

UPDATE, how do I upload an excel file? The file is not listed when I try to attach it.
 

Attachments

  • example 3.xlsx
    14.2 KB · Views: 1
Hi @shani1975
Good day and welcome to the forum :awesome:

You can use SUMIFS like:
=SUM(SUMIFS(K:K,A:A,2016,B:B,"Dec",C:C,"WEEK 3",E:E,{"OCC","RCC"}))

Regards,


PS: Your attachment have been included.
 
Hi,

It's a regular formula not an array formula.

Here is one more alternate:
=SUMPRODUCT((A2:A99=2016)*(B2:B99="Dec")*(C2:C99="WEEK 3")*((E2:E99="OCC")+(E2:E99="RCC")),K2:K99)

Regards,
 
It is returning a zero, I should be getting the number 4 since there are 4 people that are FT that are listed as REG or INTERIM at the OCC or RCC. Am I doing something wrong?
 
Hi,

See the attached with both formulas, and one more way with simple Pivot.

Regards,
 

Attachments

  • example 3 shani1975.xlsx
    20.3 KB · Views: 3
If the Location codes will always be RCC or OCC, you can use this alternative.
=SUMIFS(K2:K27,A2:A27,2016,B2:B27,"Dec",C2:C27,"Week 3",E2:E27,"?CC")

But again, as @Khalid NGO suggested, use either a pivot or SUMPRODUCT or SUMIFS as they will give you accurate results when you have more items in the data.
 
Back
Top