I am in need of a formula that can sum ranges across worksheets with more than one criteria.
The following works but looking for a way to simplify:
I created a list of sheet names (Jan 2012, Feb 2012) and called it MnthTabs. I need to do this for all months of the year, so the formula above would get too unweildy.
I tried the following but it does not work.
=SUMPRODUCT(SUMIF(INDIRECT("'"&MnthTabs&"'!$B$9:$B$55"),K$8,INDIRECT("'"&MnthTabs&"'!$H$9:$H$55"))+SUMIF(INDIRECT("'"&MnthTabs&"'!$c$9:$c$55"),D$16,INDIRECT("'"&MnthTabs&"'!$H$9:$H$55")))
This results in a value, but the wrong value. It sums all values in H9:H55 for each condition found when K8="PI" and D16="Edgar Allen" independently. I need the sum only when both conditions exist in the ranges B9:B55 and C9:C55.
Thanks
The following works but looking for a way to simplify:
Code:
=SUMPRODUCT(--('Jan 2012'!$B$9:$B$55=K$8),--('Jan 2012'!$C$9:$C$55=D$16),'Jan 2012'!$H$9:$H$55)+SUMPRODUCT(--('Feb 2012'!$B$9:$B$55=K$8),--('Feb 2012'!$C$9:$C$55=D$16),'Feb 2012'!$H$9:$H$55)
I created a list of sheet names (Jan 2012, Feb 2012) and called it MnthTabs. I need to do this for all months of the year, so the formula above would get too unweildy.
I tried the following but it does not work.
=SUMPRODUCT(SUMIF(INDIRECT("'"&MnthTabs&"'!$B$9:$B$55"),K$8,INDIRECT("'"&MnthTabs&"'!$H$9:$H$55"))+SUMIF(INDIRECT("'"&MnthTabs&"'!$c$9:$c$55"),D$16,INDIRECT("'"&MnthTabs&"'!$H$9:$H$55")))
This results in a value, but the wrong value. It sums all values in H9:H55 for each condition found when K8="PI" and D16="Edgar Allen" independently. I need the sum only when both conditions exist in the ranges B9:B55 and C9:C55.
Thanks