Link to home
Start Free TrialLog in
Avatar of Matt Pinkston
Matt Pinkston

asked on

Stump the Excel Expert

One more stumper Excel question, I am using these formulas

=SUMPRODUCT((Employees!I2:I74=B3)*(Employees!D2:D74="India")*Employees!Q2:Q74)
=COUNTIFS(Employees!I:I,B3,Employees!D:D,"India")

How would I
1. exclude entries where employees column S = mid wfr
2. exclude entries where employees column S CONTAINS "wfr"
3. include rows where employees column S = "active" or = "mid hire"
Avatar of Tom Farrar
Tom Farrar
Flag of United States of America image

Been watching your questions, and thought if you data is formatted as a table on the Data tab, you may want to consider using a pivot table to accomplish all your filtering. Just a thought..
Avatar of Matt Pinkston
Matt Pinkston

ASKER

its a one time table that we need to use just wanted some formulas
Firstly SUMPRODUCT is an older, and slower, formula than SUMIFS which in this case may be better and more understandable:

Such that
=SUMPRODUCT((Employees!I2:I74=B3)*(Employees!D2:D74="India")*Employees!Q2:Q74)

Open in new window

Becomes
=SUMIFS(Employees!Q2:Q74, Employees!I2:I74 , B3 , Employees!D2:D74 , "India")

Open in new window


And then you can add to that such that:
=SUMIFS(Employees!Q2:Q74, Employees!I2:I74 , B3 , Employees!D2:D74 , "India", Employees!S2:S74 , "<>*wfr*")

Open in new window

OR
=SUMIFS(Employees!Q2:Q74, Employees!I2:I74 , B3 , Employees!D2:D74 , "India", Employees!S2:S74 , "active")

Open in new window

OR
=SUMIFS(Employees!Q2:Q74, Employees!I2:I74 , B3 , Employees!D2:D74 , "India", Employees!S2:S74 , "active")
+ SUMIFS(Employees!Q2:Q74, Employees!I2:I74 , B3 , Employees!D2:D74 , "India", Employees!S2:S74 , "mid hire")

Open in new window


The SUMIFS is certainly more undertstandable than SUMPRODUCT
The  SUMPRODCUT would be:
=SUMPRODUCT((Employees!I2:I74=B3)*(Employees!D2:D74="India")*(EmployeesC2:C74="<>*wfr*")*Employees!Q2:Q74)

Open in new window


These are not tested, but should be about right :)
ASKER CERTIFIED SOLUTION
Avatar of Steve
Steve
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Awesome help!!!!!!