Sumifs or another way round

rdev

Active Member
Joined
Dec 3, 2007
Messages
273
I have been stuck with this problem of having a sumifs formula to extract data from a table and place it in anothet format , see attached , I want to sum the data in column F& G based on the country and code and year
Any help would be appreciated . The file is shared

sumif.xlsx - Google Drive
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Insert the following in Cells J13:M13 and autofill down.



[TABLE="width: 560"]
<tbody>[TR]
[TD="class: xl65, width: 362, bgcolor: yellow"]=SUMIFS($F$4:$F$16,$E$4:$E$16,$I13,$D$4:$D$16,J$10)
[/TD]
[TD="class: xl65, width: 128, bgcolor: yellow"]=SUMIFS($G$4:$G$16,$E$4:$E$16,$I13,$D$4:$D$16,K$10)
[/TD]
[TD="class: xl65, width: 128, bgcolor: yellow"]=SUMIFS($F$4:$F$16,$E$4:$E$16,$I13,$D$4:$D$16,L$10)
[/TD]
[TD="class: xl65, width: 128, bgcolor: yellow"]=SUMIFS($G$4:$G$16,$E$4:$E$16,$I13,$D$4:$D$16,M$10)
[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
[Table="width:, class:grid"][tr][td]Row\Col[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][td]
E​
[/td][td]
F​
[/td][td]
G​
[/td][td]
H​
[/td][td]
I​
[/td][td]
J​
[/td][td]
K​
[/td][td]
L​
[/td][td]
M​
[/td][/tr][tr][td]
3​
[/td][td]Cluster[/td][td]BUCO[/td][td]Conp Name[/td][td]Acc_code[/td][td]Y2016[/td][td]Y2017[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
4​
[/td][td]Bldg[/td][td]SM[/td][td]Dubai[/td][td="bgcolor:#FFC7CE"]
1101
[/td][td]
3400​
[/td][td]
6800​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
5​
[/td][td]Bldg[/td][td]SM[/td][td]Dubai[/td][td="bgcolor:#FFC7CE"]
1203
[/td][td]
3200​
[/td][td]
6400​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
6​
[/td][td]Bldg[/td][td]SM[/td][td]Dubai[/td][td="bgcolor:#FFC7CE"]
1401
[/td][td]
4900​
[/td][td]
9800​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
7​
[/td][td]Bldg[/td][td]SM[/td][td]Dubai[/td][td="bgcolor:#FFC7CE"]
1203
[/td][td]
3100​
[/td][td]
6200​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
8​
[/td][td]Bldg[/td][td]SM[/td][td]Dubai[/td][td="bgcolor:#FFC7CE"]
1611
[/td][td]
4100​
[/td][td]
8200​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
9​
[/td][td]Bldg[/td][td]SM[/td][td]Dubai[/td][td]
1609​
[/td][td]
4800​
[/td][td]
9600​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
10​
[/td][td]Bldg[/td][td]SM[/td][td]Dubai[/td][td="bgcolor:#FFC7CE"]
1401
[/td][td]
5000​
[/td][td]
10000​
[/td][td][/td][td][/td][td]Dubai[/td][td]Dubai[/td][td]Sri Lanka[/td][td]Sri Lanka[/td][/tr]
[tr][td]
11​
[/td][td][/td][td]FB[/td][td]Sri Lanka[/td][td="bgcolor:#FFC7CE"]
1203
[/td][td]
1500​
[/td][td]
3000​
[/td][td][/td][td][/td][td]Y2016[/td][td]Y2017[/td][td]Y2016[/td][td]Y2017[/td][/tr]
[tr][td]
12​
[/td][td][/td][td]FB[/td][td]Sri Lanka[/td][td="bgcolor:#FFC7CE"]
1611
[/td][td]
4000​
[/td][td]
8000​
[/td][td][/td][td][/td][td]SM[/td][td]SM[/td][td]FB[/td][td]FB[/td][/tr]
[tr][td]
13​
[/td][td][/td][td]FB[/td][td]Sri Lanka[/td][td="bgcolor:#FFC7CE"]
1401
[/td][td]
4200​
[/td][td]
8400​
[/td][td][/td][td]
1101​
[/td][td="bgcolor:#FFFF00"]
3400​
[/td][td="bgcolor:#FFFF00"]
6800​
[/td][td="bgcolor:#FFFF00"]
3100​
[/td][td="bgcolor:#FFFF00"]
6200​
[/td][/tr]
[tr][td]
14​
[/td][td][/td][td]FB[/td][td]Sri Lanka[/td][td="bgcolor:#FFC7CE"]
1203
[/td][td]
3900​
[/td][td]
7800​
[/td][td][/td][td]
1203​
[/td][td="bgcolor:#FFFF00"]
6300​
[/td][td="bgcolor:#FFFF00"]
12600​
[/td][td="bgcolor:#FFFF00"]
10400​
[/td][td="bgcolor:#FFFF00"]
20800​
[/td][/tr]
[tr][td]
15​
[/td][td][/td][td]FB[/td][td]Sri Lanka[/td][td="bgcolor:#FFC7CE"]
1101
[/td][td]
3100​
[/td][td]
6200​
[/td][td][/td][td]
1401​
[/td][td="bgcolor:#FFFF00"]
9900​
[/td][td="bgcolor:#FFFF00"]
19800​
[/td][td="bgcolor:#FFFF00"]
4200​
[/td][td="bgcolor:#FFFF00"]
8400​
[/td][/tr]
[tr][td]
16​
[/td][td][/td][td]FB[/td][td]Sri Lanka[/td][td="bgcolor:#FFC7CE"]
1203
[/td][td]
5000​
[/td][td]
10000​
[/td][td][/td][td]
1611​
[/td][td="bgcolor:#FFFF00"]
4100​
[/td][td="bgcolor:#FFFF00"]
8200​
[/td][td="bgcolor:#FFFF00"]
4000​
[/td][td="bgcolor:#FFFF00"]
8000​
[/td][/tr]
[tr][td]
17​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
1609​
[/td][td="bgcolor:#FFFF00"]
4800​
[/td][td="bgcolor:#FFFF00"]
9600​
[/td][td="bgcolor:#FFFF00"]
0​
[/td][td="bgcolor:#FFFF00"]
0​
[/td][/tr]
[tr][td]
18​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


In J13 enter, copy across, and down:

=SUMIFS(INDEX($F$4:$G$16,0,MATCH(J$11,$F$3:$G$3,0)),$E$4:$E$16,$I13,$D$4:$D$16,J$10,$C$4:$C$16,J$12)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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