How to do regional aggregation based on country data in Excel

comper

New Member
Joined
Nov 29, 2013
Messages
3
<embed id="xunlei_com_thunder_helper_plugin_d462f475-c18e-46be-bd10-327458d045bd" type="application/thunder_download_plugin" height="0" width="0">HI, everyone, I working on some country group numbers.
Given the aggregation of the country often change, so it will be convenient to have a flexible setting on this, and automatically sum the country data to group data. But I tried sum product and index, vlookup.
Seems doesn't work, and the difficulty is mainly on a. three sheets are from different places. b. how to map one aggregated region to the country regions in Excel.

Attached, please help me, thanks!.

Sheet 1: Region_mapping, e.g. EUG4 =France +Germany +Italy +UK.
Sheet 2: Data for these countries (this table is always from exogenous source, so change directly on this table might not be convenient).
Sheet 3, I want to get the summation of these 4 countries as the number for EUG4.

For example, for EUG4
Sumproduct (--(Aggeregation_region="EUG4"),--(Euro_region..=…),). I don't how to map from data to country and then to aggregation further together.




Thanks!

Comper<embed id="xunlei_com_thunder_helper_plugin_d462f475-c18e-46be-bd10-327458d045bd" type="application/thunder_download_plugin" height="0" width="0"><embed id="xunlei_com_thunder_helper_plugin_d462f475-c18e-46be-bd10-327458d045bd" type="application/thunder_download_plugin" height="0" width="0"><embed id="xunlei_com_thunder_helper_plugin_d462f475-c18e-46be-bd10-327458d045bd" type="application/thunder_download_plugin" height="0" width="0">
 
Last edited:

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
[TABLE="class: grid, width: 457"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]aggregation[/TD]
[TD]country[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]OE5[/TD]
[TD]Norway[/TD]
[/TR]
[TR]
[TD]OE5[/TD]
[TD]Switzerland[/TD]
[/TR]
[TR]
[TD]OE5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]OE5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]EUG4[/TD]
[TD]France[/TD]
[/TR]
[TR]
[TD]EUG4[/TD]
[TD]Germany (until 1990 former territory of the FRG)[/TD]
[/TR]
[TR]
[TD]EUG4[/TD]
[TD]Italy[/TD]
[/TR]
[TR]
[TD]EUG4[/TD]
[TD]United Kingdom[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="class: grid, width: 479"]
<colgroup><col><col span="3"></colgroup><tbody>[TR]
[TD] [/TD]
[TD]2010[/TD]
[TD]2011[/TD]
[TD]2012[/TD]
[/TR]
[TR]
[TD]Belgium[/TD]
[TD="align: right"]17,755[/TD]
[TD="align: right"]17,750[/TD]
[TD="align: right"]14,521[/TD]
[/TR]
[TR]
[TD]Bulgaria[/TD]
[TD="align: right"]6,120[/TD]
[TD="align: right"]6,518[/TD]
[TD="align: right"]6,286[/TD]
[/TR]
[TR]
[TD]Czech Republic[/TD]
[TD="align: right"]14,762[/TD]
[TD="align: right"]14,985[/TD]
[TD="align: right"]14,403[/TD]
[/TR]
[TR]
[TD]Denmark[/TD]
[TD="align: right"]10,573[/TD]
[TD="align: right"]12,025[/TD]
[TD="align: right"]12,292[/TD]
[/TR]
[TR]
[TD]Germany (until 1990 former territory of the FRG)[/TD]
[TD="align: right"]252,462[/TD]
[TD="align: right"]265,025[/TD]
[TD="align: right"]254,499[/TD]
[/TR]
[TR]
[TD]Estonia[/TD]
[TD="align: right"]1,388[/TD]
[TD="align: right"]1,561[/TD]
[TD="align: right"]1,599[/TD]
[/TR]
[TR]
[TD]Ireland[/TD]
[TD="align: right"]8,221[/TD]
[TD="align: right"]7,470[/TD]
[TD="align: right"]7,419[/TD]
[/TR]
[TR]
[TD]Greece[/TD]
[TD="align: right"]25,256[/TD]
[TD="align: right"]16,809[/TD]
[TD="align: right"]16,486[/TD]
[/TR]
[TR]
[TD]Spain[/TD]
[TD="align: right"]146,194[/TD]
[TD="align: right"]142,323[/TD]
[TD="align: right"]133,368[/TD]
[/TR]
[TR]
[TD]France[/TD]
[TD="align: right"]164,325[/TD]
[TD="align: right"]168,242[/TD]
[TD="align: right"]156,449[/TD]
[/TR]
[TR]
[TD]Croatia[/TD]
[TD="align: right"]4,547[/TD]
[TD="align: right"]4,375[/TD]
[TD="align: right"]4,145[/TD]
[/TR]
[TR]
[TD]Italy[/TD]
[TD="align: right"]149,248[/TD]
[TD="align: right"]127,681[/TD]
[TD="align: right"]111,785[/TD]
[/TR]
[TR]
[TD]Cyprus[/TD]
[TD="align: right"]1,066[/TD]
[TD="align: right"]923[/TD]
[TD="align: right"]880[/TD]
[/TR]
[TR]
[TD]Latvia[/TD]
[TD="align: right"]2,561[/TD]
[TD="align: right"]2,646[/TD]
[TD="align: right"]2,616[/TD]
[/TR]
[TR]
[TD]Lithuania[/TD]
[TD="align: right"]2,292[/TD]
[TD="align: right"]2,320[/TD]
[TD="align: right"]2,438[/TD]
[/TR]
[TR]
[TD]Luxembourg[/TD]
[TD="align: right"]574[/TD]
[TD="align: right"]650[/TD]
[TD="align: right"]1,047[/TD]
[/TR]
[TR]
[TD]Hungary[/TD]
[TD="align: right"]11,329[/TD]
[TD="align: right"]10,534[/TD]
[TD="align: right"]9,181[/TD]
[/TR]
[TR]
[TD]Netherlands[/TD]
[TD="align: right"]33,782[/TD]
[TD="align: right"]33,593[/TD]
[TD="align: right"]32,654[/TD]
[/TR]
[TR]
[TD]Austria[/TD]
[TD="align: right"]13,914[/TD]
[TD="align: right"]14,475[/TD]
[TD="align: right"]14,118[/TD]
[/TR]
[TR]
[TD]Poland[/TD]
[TD="align: right"]82,218[/TD]
[TD="align: right"]89,734[/TD]
[TD="align: right"]89,013[/TD]
[/TR]
[TR]
[TD]Portugal[/TD]
[TD="align: right"]12,881[/TD]
[TD="align: right"]12,673[/TD]
[TD="align: right"]11,180[/TD]
[/TR]
[TR]
[TD]Romania[/TD]
[TD="align: right"]12,096[/TD]
[TD="align: right"]11,858[/TD]
[TD="align: right"]12,673[/TD]
[/TR]
[TR]
[TD]Slovenia[/TD]
[TD="align: right"]2,288[/TD]
[TD="align: right"]2,177[/TD]
[TD="align: right"]1,849[/TD]
[/TR]
[TR]
[TD]Slovakia[/TD]
[TD="align: right"]5,198[/TD]
[TD="align: right"]4,906[/TD]
[TD="align: right"]5,073[/TD]
[/TR]
[TR]
[TD]Finland[/TD]
[TD="align: right"]25,156[/TD]
[TD="align: right"]23,732[/TD]
[TD="align: right"]21,928[/TD]
[/TR]
[TR]
[TD]Sweden[/TD]
[TD="align: right"]32,732[/TD]
[TD="align: right"]33,402[/TD]
[TD="align: right"]30,370[/TD]
[/TR]
[TR]
[TD]United Kingdom[/TD]
[TD="align: right"]137,753[/TD]
[TD]:[/TD]
[TD]:[/TD]
[/TR]
[TR]
[TD]Liechtenstein[/TD]
[TD]:[/TD]
[TD]:[/TD]
[TD]:[/TD]
[/TR]
[TR]
[TD]Norway[/TD]
[TD="align: right"]16,344[/TD]
[TD="align: right"]16,131[/TD]
[TD="align: right"]16,983[/TD]
[/TR]
[TR]
[TD]Switzerland[/TD]
[TD="align: right"]9,550[/TD]
[TD="align: right"]9,912[/TD]
[TD="align: right"]9,987[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="class: grid, width: 313"]
<colgroup><col><col span="3"></colgroup><tbody>[TR]
[TD][/TD]
[TD="align: right"]2010[/TD]
[TD="align: right"]2011[/TD]
[TD="align: right"]2012[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]OE5[/TD]
[TD]???[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]EUG4[/TD]
[TD]???[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
Welcome to the Forum, try something like this. Use a helper column and assign a number to the countries then you can simply use a SUMIF to gather the year information for that regions example shown below:
Excel Workbook
ABCDE
1Country201020112012Helper
2Belgium17,75517,75014,521
3Bulgaria6,1206,5186,286
4Czech Republic14,76214,98514,403
5Denmark10,57312,02512,292
6Germany (until 1990 former territory of the FRG)252,462265,025254,4991
7Estonia1,3881,5611,599
8Ireland8,2217,4707,419
9Greece25,25616,80916,486
10Spain146,194142,323133,368
11France164,325168,242156,4491
12Croatia4,5474,3754,145
13Italy149,248127,681111,7851
14Cyprus1,066923880
15Latvia2,5612,6462,616
16Lithuania2,2922,3202,438
17Luxembourg5746501,047
18Hungary11,32910,5349,181
19Netherlands33,78233,59332,654
20Austria13,91414,47514,118
21Poland82,21889,73489,013
22Portugal12,88112,67311,180
23Romania12,09611,85812,673
24Slovenia2,2882,1771,849
25Slovakia5,1984,9065,073
26Finland25,15623,73221,928
27Sweden32,73233,40230,370
28United Kingdom137,753::1
29Liechtenstein:::
30Norway16,34416,13116,983
31Switzerland9,5509,9129,987
Sheet1
Then SUMIF table results
Excel Workbook
FGHIJ
1201020112012
2
3OE5???
4EUG4 =France +Germany +Italy +UKEUG4700168596624
Sheet1
 
Upvote 0
many thanks. It works like this. But still, it need I put a new flag to the regional aggregation. So the problem seems to be: how I can express the condition to judge whether a country belonging to a group or not, then sum the number of the country to the group.

Any hints on the best method???
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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