Forum Discussion

elinsnoring's avatar
elinsnoring
Copper Contributor
Mar 26, 2019

SUMIF

Dear Community, 

 

I would greatly appreciate some help with conducting a (in my mind) quite challenging task in excel. So, below you find an example of my spreadsheet. In the first column you find the company name (A or B), in the second column you find which countries these companies are active in, the third column states if the country is a EU- or non-EU country, column four gives us the number of emissions that each company emits in each country, and the fifth column states the year of the emission activities. 

 

As you can see, the countries of operation differ between company A and B in both 2018 and 2019, and also company A operates in one less country in 2018, whereas company B operates in one more. 

 

So, what I would like to do is aggregate the emissions data for each company, and each year and have this number aggregated for EU emissions and non-EU emissions respectively. Could you please instruct me on how to do this?

 

Thank you so much in advance!

 

CompanyCountryEU =1, non-EU = 0Emissions (metric tons)YearEmissions in EU per company and yearEmissions ouside EU per company and year
ASweden1102018  
ADenmark1122018  
AAustralia0302018  
AUSA0652018  
BSweden 1102018  
BDenmark1122018  
BAustralia0302018  
BUSA0652018  
BUnited Kingdom1222018  
ASweden 1132017  
AFrance1502017  
AIndia022017  
APoland152017  
AUSA0202017  
BUSA0202017  
BSweden1132017  
BArgentina082017  
BFrance1502017  

7 Replies

    • elinsnoring's avatar
      elinsnoring
      Copper Contributor

      Hi SergeiBaklan,

       

      Thank you vey much for this. 

       

      However, as my full sample contains approximately 2 400 companies operating in around 150 countries each I am not sure if the approach you describe is applicable here. Do you consider the Pivot Table to be a good approach when the sample is of such as size or do you know of any other method to use? 

       

      All the best,

       

      Elin

      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        Hi Elin,

         

        PivotTable is natural way for such kind of summaries, you filter and total it in different ways, create few PivotTable to show results from different views. Additionally you may add charts to illustrate such results.

         

        2400x150 gives 360,000 records, it shall work.

         

        If it's enough for you only translate 1 and zero into emissions in last two columns that's simple IF() as attached. Sure, you may summarise by formulas, same SUMIFS(), but for that you you need to design resulting table(s) into which to summarize, how they looks like. As I understood in your table combination of Company/Country/Year are not repeating.

Resources