sumif

Salamullah

Board Regular
Joined
Mar 28, 2011
Messages
221
I have sales data with area & volume with sales value for both the years I want to bring total in the respective sales area, need formula when I will add new data it will automatically give results.


[TABLE="width: 352"]
<tbody>[TR]
[TD]Data[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Year[/TD]
[TD]Volume[/TD]
[TD]Sales[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]200[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]400[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]550[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]200[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]300[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]400[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]550[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"]36[/TD]
[TD="align: right"]2900[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Result required[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 2"]Volume[/TD]
[TD="colspan: 2"]Sales[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]2017[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]600[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]850[/TD]
[TD="align: right"]850[/TD]
[/TR]
[TR]
[TD]TOTAL[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]1450[/TD]
[TD="align: right"]1450[/TD]
[/TR]
</tbody><colgroup><col><col span="4"></colgroup>[/TABLE]
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Is this what you mean?
The formula in G3 is copied across to H3 and down to row 4.
The formula in I3 is copied across to J3 and down to row 4.


Book1
ABCDEFGHIJ
1YearVolumeSalesVolumeSales
2A201812002018201720182017
3B20182300A412600600
4A20183400B614850850
5B20184550TOTAL102614501450
6A20175200
7B20176300
8A20177400
9B20178550
SUMIFS
Cell Formulas
RangeFormula
G3=SUMIFS($C$2:$C$1000,$A$2:$A$1000,$F3,$B$2:$B$1000,G$2)
I3=SUMIFS($D$2:$D$1000,$A$2:$A$1000,$F3,$B$2:$B$1000,I$2)
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

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