How sum values for multiple columns based on headers across sheets except the others

Maklil

Board Regular
Joined
Jun 23, 2022
Messages
175
Office Version
  1. 2019
Platform
  1. Windows
HI

the result should be in columns G,H in sheet summary after matching the headers COST TOTAL , SALES TOTAL for each item based on column B . so what I want to match the headers for each item just for three sheets SH,PTT,PMT ,then should sum the values are existed in column COST TOTAL for sheets SH,PTT,and the sum the values are existed in column SALES TOTAL for sheets SH,PMT with considering if there is duplicates items for three sheets should merge for instance HR2002 =21,600+21,600+21,450=64650 for cost total , the same thing for column sales total .as to sheets PVT,PMM if there are new items are not existed in sheets SH,PTT,PMT then should also add it with merge duplicates items . I have about 7500 rows across sheets
sum.xlsm
ABCDEFGHIJ
1ITEMCODEBRANDMINTBRQTYCOSTSALESCOST TOTALSALES TOTAL
21HR2000CR/MM-1CCNTYI200.00KWD 123.00KWD 133.00KWD 24,600.00KWD 26,600.00
32HR2001CR/MM-1CCNTRY250.00KWD 122.00KWD 133.00KWD 30,500.00KWD 33,250.00
43HR2002CR/MM-1CCNTRE150.00KWD 144.00KWD 150.00KWD 21,600.00KWD 22,500.00
54HR2003CR/MM-2CCNTRE200.00KWD 145.00KWD 160.00KWD 29,000.00KWD 32,000.00
SH
Cell Formulas
RangeFormula
I2:I5I2=G2*F2
J2:J5J2=H2*F2



sum.xlsm
ABCDEFGH
1ITEMCODEBRANDMINTBRQTYCOSTCOST TOTAL
21HR2000CR/MM-1CCNTYI200.00KWD 123.00KWD 24,600.00
32HR2001CR/MM-1CCNTRY250.00KWD 122.00KWD 30,500.00
43HR2002CR/MM-1CCNTRE150.00KWD 144.00KWD 21,600.00
54HR2003CR/MM-2CCNTRE200.00KWD 145.00KWD 29,000.00
65HR2001CR/MM-1CCNTRY250.00KWD 123.00KWD 30,750.00
76HR2004CR/MM-2CCNTREI200.00KWD 145.00KWD 29,000.00
87HR2004CR/MM-2CCNTREI200.00KWD 146.00KWD 29,200.00
98HR2002CR/MM-1CCNTRE150.00KWD 143.00KWD 21,450.00
PTT
Cell Formulas
RangeFormula
H2:H9H2=G2*F2


sum.xlsm
ABCDEFGH
1ITEMCODEBRANDMINTBRQTYSALESSALES TOTAL
21HR2002CR/MM-1CCNTREKWD 150.00KWD 144.00KWD 21,600.00
32HR2003CR/MM-2CCNTREKWD 200.00KWD 145.00KWD 29,000.00
43HR2004CR/MM-2CCNTREIKWD 200.00KWD 147.00KWD 29,400.00
54HR2000CR/MM-1CCNTYIKWD 200.00KWD 123.00KWD 24,600.00
65HR2001CR/MM-1CCNTRYKWD 250.00KWD 122.00KWD 30,500.00
76HR2004CR/MM-2CCNTREIKWD 200.00KWD 148.00KWD 29,600.00
87HR2003CR/MM-2CCNTREKWD 200.00KWD 145.00KWD 29,000.00
PMT
Cell Formulas
RangeFormula
H2:H8H2=G2*F2


sum.xlsm
ABCDEFGH
1ITEMCODEBRANDMINTBRQTYCOSTCOST TOTAL
21HR2000CR/MM-1CCNTYIKWD 200.00KWD 133.00KWD 26,600.00
32HR2001CR/MM-1CCNTRYKWD 250.00KWD 133.00KWD 33,250.00
43HR2002CR/MM-1CCNTREKWD 150.00KWD 150.00KWD 22,500.00
54HR2003CR/MM-2CCNTREQKWD 200.00KWD 160.00KWD 32,000.00
65HR2004CR/MM-3CCNTREMKWD 200.00KWD 161.00KWD 32,200.00
76HR2005CR/MM-4CCNTRKWD 200.00KWD 162.00KWD 32,400.00
87HR2005CR/MM-4CCNTRKWD 200.00KWD 163.00KWD 32,600.00
PVT
Cell Formulas
RangeFormula
H2:H8H2=G2*F2


sum.xlsm
ABCDEFGH
1ITEMCODEBRANDMINTBRQTYSALESSALES TOTAL
21HR2000CR/MM-1CCNTYIKWD 200.00KWD 123.00KWD 24,600.00
32HR20011CR/MM-1CCNTRASKWD 250.00KWD 123.00KWD 30,750.00
43HR20011CR/MM-2CCNTRASKWD 251.00KWD 124.00KWD 31,124.00
54HR2005CR/MM-4CCNTRKWD 200.00KWD 166.00KWD 33,200.00
65HR2005CR/MM-4CCNTRKWD 200.00KWD 166.00KWD 33,200.00
PMM
Cell Formulas
RangeFormula
H2:H6H2=G2*F2


sum.xlsm
ABCDEFGH
1ITEMCODEBRANDMINTBRQTYCOST TOTALSALES TOTAL
21HR2000CR/MM-1CCNTYI234.00
32HR2001CR/MM-1CCNTRY300.00
43HR2002CR/MM-1CCNTRE450.00
54HR2003CR/MM-2CCNTRE2,344.00
65HR2004CR/MM-2CCNTREI245.00
76HR2005CR/MM-4CCNTR340.00
87HR20011CR/MM-2CCNTRAS400
SUMMARY



result
sum.xlsm
ABCDEFGH
1ITEMCODEBRANDMINTBRQTYCOST TOTALSALES TOTAL
21HR2000CR/MM-1CCNTYI234.00KWD 49,200.00KWD 51,200.00
32HR2001CR/MM-1CCNTRY300.00KWD 91,750.00KWD 63,750.00
43HR2002CR/MM-1CCNTRE450.00KWD 64,650.00KWD 44,100.00
54HR2003CR/MM-2CCNTRE2,344.00KWD 58,000.00KWD 116,000.00
65HR2004CR/MM-2CCNTREI245.00KWD 58,200.00KWD 59,000.00
76HR2005CR/MM-4CCNTR340.00KWD 65,000.00KWD 66,400.00
87HR20011CR/MM-2CCNTRAS400KWD 61,874.00
SUMMARY

I hope some body help
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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