Forum Discussion
SUMIF
Hi elinsnoring ,
You may create Pivot Table on first columns as attached adding more cosmetic to it.
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
- SergeiBaklanMar 26, 2019Diamond Contributor
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.
- elinsnoringMar 26, 2019Copper Contributor
Hi SergeiBaklan,
Thank you for the prompt reply.
As this data will be transported into STATA I think that I should go for the SUMIF option. I am a bit unsure if STATA can read the Pivot Table.
Do you by any chance know how I can summarise the EU- and non-EU emissions data by company? That is, a command saying sum emissions in EU by company and sum emissions outside of EU by company?
- SergeiBaklanMar 26, 2019Diamond Contributor
elinsnoring , it depends on how you design your resulting table, but in any case you need a list of companies.
For such sample
first formula will be
=SUMIFS($G$4:$G$21,$B$4:$B$21,$K4,$F$4:$F$21,L$2,$D$4:$D$21,1)
, rest in the row are similar, and drag them down. Please see second sheet in attached.