Hi
I have some sales data, I use Pivot Tables to organize the data into countries. So I have a column of countries with a column of sales for each country. Now I would like to sum up the sales into various groups, namely:
1. Germany
2. Europe
3. Non Europe
I can do this manually by using
=GETPIVOTDATA("GBP",$A$3,"Country","Germany")
for example
I can then have string of these commands to make up Europe
=GETPIVOTDATA("GBP",$A$3,"Country","Austria")+GETPIVOTDATA("GBP",$A$3,"Country","Belgium")+GETPIVOTDATA("GBP",$A$3,"Country","Croatia")+GETPIVOTDATA("GBP",$A$3,"Country","Cyprus")+GETPIVOTDATA("GBP",$A$3,"Country","Czech Republic")+GETPIVOTDATA("GBP",$A$3,"Country","Denmark")+GETPIVOTDATA("GBP",$A$3,"Country","Estonia")+GETPIVOTDATA("GBP",$A$3,"Country","Finland")+GETPIVOTDATA("GBP",$A$3,"Country","France")+GETPIVOTDATA("GBP",$A$3,"Country","Gibraltar")+GETPIVOTDATA("GBP",$A$3,"Country","Greece")+GETPIVOTDATA("GBP",$A$3,"Country","Iceland")+GETPIVOTDATA("GBP",$A$3,"Country","Ireland")+GETPIVOTDATA("GBP",$A$3,"Country","Italy")+GETPIVOTDATA("GBP",$A$3,"Country","Latvia")+GETPIVOTDATA("GBP",$A$3,"Country","Lithuania")+GETPIVOTDATA("GBP",$A$3,"Country","Malta")+GETPIVOTDATA("GBP",$A$3,"Country","Netherlands")+GETPIVOTDATA("GBP",$A$3,"Country","Poland")+GETPIVOTDATA("GBP",$A$3,"Country","Portugal")+GETPIVOTDATA("GBP",$A$3,"Country","Spain")+GETPIVOTDATA("GBP",$A$3,"Country","Sweden")+GETPIVOTDATA("GBP",$A$3,"Country","United Kingdom")
etc etc
However, the problem I have is, with every new set of data, not all countries are present, or some new ones are introduced. So how can I make a setup so that I create group of countries called Europe for example, then it will look if the country is present or not and sum up the data?
Any ideas?
Many Thanks
Gurpreet
I have some sales data, I use Pivot Tables to organize the data into countries. So I have a column of countries with a column of sales for each country. Now I would like to sum up the sales into various groups, namely:
1. Germany
2. Europe
3. Non Europe
I can do this manually by using
=GETPIVOTDATA("GBP",$A$3,"Country","Germany")
for example
I can then have string of these commands to make up Europe
=GETPIVOTDATA("GBP",$A$3,"Country","Austria")+GETPIVOTDATA("GBP",$A$3,"Country","Belgium")+GETPIVOTDATA("GBP",$A$3,"Country","Croatia")+GETPIVOTDATA("GBP",$A$3,"Country","Cyprus")+GETPIVOTDATA("GBP",$A$3,"Country","Czech Republic")+GETPIVOTDATA("GBP",$A$3,"Country","Denmark")+GETPIVOTDATA("GBP",$A$3,"Country","Estonia")+GETPIVOTDATA("GBP",$A$3,"Country","Finland")+GETPIVOTDATA("GBP",$A$3,"Country","France")+GETPIVOTDATA("GBP",$A$3,"Country","Gibraltar")+GETPIVOTDATA("GBP",$A$3,"Country","Greece")+GETPIVOTDATA("GBP",$A$3,"Country","Iceland")+GETPIVOTDATA("GBP",$A$3,"Country","Ireland")+GETPIVOTDATA("GBP",$A$3,"Country","Italy")+GETPIVOTDATA("GBP",$A$3,"Country","Latvia")+GETPIVOTDATA("GBP",$A$3,"Country","Lithuania")+GETPIVOTDATA("GBP",$A$3,"Country","Malta")+GETPIVOTDATA("GBP",$A$3,"Country","Netherlands")+GETPIVOTDATA("GBP",$A$3,"Country","Poland")+GETPIVOTDATA("GBP",$A$3,"Country","Portugal")+GETPIVOTDATA("GBP",$A$3,"Country","Spain")+GETPIVOTDATA("GBP",$A$3,"Country","Sweden")+GETPIVOTDATA("GBP",$A$3,"Country","United Kingdom")
etc etc
However, the problem I have is, with every new set of data, not all countries are present, or some new ones are introduced. So how can I make a setup so that I create group of countries called Europe for example, then it will look if the country is present or not and sum up the data?
Any ideas?
Many Thanks
Gurpreet