Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SUMIF problem 1

Status
Not open for further replies.

Roosters

Technical User
May 14, 2000
61
AU
Hi,
Is there a way of finding the sum of a range that has to satisfy 2 criteria with the SUMIF function? I have a list labelled Type - Year - QTY as shown below, I need to find the sum of the QTY column when for example the TYPE is "A" and the year is 2009. The result should be 4.

TYPE - YEAR - QTY
A 12/07/08 1
B 12/07/08 2
A 12/07/09 3 <---
B 12/07/09 4
A 12/07/10 1
B 12/07/10 2
A 12/07/08 3
B 12/07/08 4
A 12/07/09 1 <---
B 12/07/09 2
A 12/07/10 3
B 12/07/10 4

Thanks in advance Phil
 


hi,

If you have 2007, use SUMIFS().

2003, use SUMPRODUCT. Change your column heading from Year to Dte. Use named ranges...
[tt
=SUMPRODUCT((Type="A")*(YEAR(Dte)=2009)*(QTY))
[/tt]


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hi Skip,

Works great, thanks for your time.

Phil
 
Hey Skip
I have successfully used the SUMPRODUCT in 2003 but have now tried the SUMIFS() in 2007 with no luck. My problem if with the YEAR() part of the Dte range giving me an error warning
My formula is =SUMIFS(QTY,Type,D32,YEAR(Dte),E32)

Any help would be appreciated

Phil
 


What values are in D32 & E32, please?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hi

D32 is text "A" and E332 is 2009 (format is General?)
Phil
 


[tt]
=SUMIFS(QTY,TYPE,D32,Dte,">="&TEXT(E32,"yyyy/mm/dd"),Dte,"<="&TEXT(F32,"yyyy/mm/dd"))
[/tt]
where E32 = 1/1/2009 and F32 = 12/31/2009.



Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top