I think I need SUMPRODUCT but I am not convinced

stugi

New Member
Joined
May 1, 2007
Messages
32
Hi,

I am trying to sum a list of data using mutiple criteria and I cannot figure out the best way. An example of the data is as follows

Col A Col B Col C Col D
Year Period Type Value
2012 9 EPC 10500
2012 11 EPC 26500
2012 12 ENB 750
2013 2 OWN 8236
2013 9 PLN 1200
2013 12 EPC 30000

I want to sum Col D by the various Types in Col C, however I need to do it upto the current period -1. So if for example we are in Period 12 2013, then sum all the sum of spend for Type EPC upto Year 2013 Period 11.

I cannot figure out how to do this without excluding the Year 2012 Period 12 values as well as Year 2013 Period 12.

any suggestions greatly received
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Excel Workbook
ABCD
1Criteria
2201312EPC0.00
3201312PLN1,200.00
4
5YearPeriodTypeValue
620129EPC10,500.00
7201211EPC26,500.00
8201212ENB750.00
920132OWN8,236.00
1020139PLN1,200.00
11201312EPC30,000.00
9a
Excel 2003
Cell Formulas
RangeFormula
D2=SUMPRODUCT(--($A$6:$A$11=A2),--($B$6:$B$11),--($C$6:$C$11=C2),($D$6:$D$11))
D3=SUMPRODUCT(--($A$6:$A$11=A3),--($B$6:$B$11),--($C$6:$C$11=C3),($D$6:$D$11))


What version of Excel are you using?

2007 and > try Sumifs
 
Upvote 0
THIS IS WHAT I CAME UP WITH.. END RESULT

AB CDEFG
1yearperiodtypevalue typevalue
220129epc10500 epc67000
3201211epc26500
4201212enb750
520132own8236
620139pln1200
7201312epc30000

<colgroup><col style="width:48pt" width="64"> <col style="width:48pt" span="7" width="64"> </colgroup><tbody>
</tbody>
\
IN CELL F1 PUT "TYPE" AND G1 "VALUE" IN CELL F2 INSERT DATA VALIDATION DROP DOWN AND HIGH LIGHT COLUMN C.. IN CELL G2 FORMULA IS =SUMIF(D3:D8,G3,E3:E8) WHEN YOU CHANGE THE DROP DOWN TO ANY OTHER TYPES... IT WILL SUM THAT VALUE..
 
Upvote 0
thanks guys, I am on 2010 and I was using Sumifs when I came a cropper.

This is my current formula

=SUMIFS('GL Data'!G:G,'GL Data'!A:A,"<="&Ref!$C$2,'GL Data'!B:B,"<"&Ref!$C$3,'GL Data'!E:E,'Cost Report'!C8)/1000


So "GL Data" is the tab with the columns of data I wish to interrogate (see smaple below). "Ref" is the tab where I get the 'Year' & 'Period' from, "Cost Report" is the tab I am doing the calculation on and Column C on "Cost Report" is where the 'Type' reference is.

Sample data (sorry do not know how to upload the samples as you have done)

A B C
Year Period BD Offline Code Total
2012 12 OWN 29,967.82
2012 12 LND 4,331,866.00
2013 11 EPC 980,452.26
2013 11 EPC 1,960,904.52
2013 11 OWN 45,714.29
2013 11 OWN 1,593.75
2013 11 OWN 4,023.07
2013 12 OWN 45,714.29
2013 12 OWN 45,714.29
2013 12 EPC 1,470,678.39
2013 12 EPC 1,960,904.52
2013 12 EPC 1,960,904.52
2013 12 EPC 2,078,339.90
2013 12 EPC 1,039,169.95
2013 12 EPC 5,612,220.83
2013 12 EPC 11,224,441.65
2013 12 EPC -11,224,441.65
2013 12 EPC -5,612,220.82
2013 12 EPC 735,339.20
2013 12 OWN 2,985.61
2013 12 EPC 11,443,174.36
2013 12 EPC 5,721,587.18
2013 12 EPC 735,339.20
2013 12 EPC 64,287.50
2013 12 EPC -393,194.82
2013 12 LND 2,500,000.00

The problem is I need the combination of Year 2013 and Period 12 to be excluded, however my currnet formula excludes all Period 12 entries because I cannot specify Year 2013 AND Period 12, I cannot make the link between these two criteria in the formula.

Sorry If this is not clear
 
Upvote 0
if send me ur email . i can send you what I think will work for you. it does what you want.. i just used sumifs with 2 criteria and data validation.. i wll look like this


9k=
 
Upvote 0
I did not as the last comment said try Sumifs, so outlined what i had done with Sumifs
 
Upvote 0
A Sumifs to try

=SUMIFS(D6:D11,A6:A11,A3,C6:C11,C3,B6:B11,"<"&B3)
 
Upvote 0

Forum statistics

Threads
1,215,184
Messages
6,123,533
Members
449,106
Latest member
techog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top