SUMIF - sum by any criteria possible?

Copper Contributor

Hi!

I want to have my set of data summed up by each country as in the second table below. Though, is there any way I can get a sum of each country (i e each criteria) without having to specifically define each country? In other words, can Excel automatically produce the complete second table?

Thanks!

Helli

 

helli76_0-1593183363367.png

 

6 Replies

@helli76 

 

You can use pivot table

 

Cheers

@helli76 

 

Using a SUMIF then the answer (I'm afraid) is no.

But if you use a pivot table - see example below - it will work easily.

 

hope that helps!

 

Peter

@helli76 

 

Hi

 

Easier way is by creating pivot table from the data.

PFA

 

1. conver the data into a table, (Select all, and click Control+ "T")

 

2. Insert --> pivot table

 

3. drop the fields as below

SupreethGuptha_0-1593186631666.png

4. and you will get the same data, which you can sort too.

SupreethGuptha_1-1593186680722.png

 

 

Hope this helps.

 

Contact me for more detailed info

 

Regards

Supreeth

supreeth.guptha@gmail.com

8904609867

 

Of course, thanks! @wumolad 

Thanks, also for the instruction! @peteryac60 

Thanks a lot, will now make sure to learn to pivot! @SupreethGuptha