Put the values based on header into last columns & matching between two sheets

leap out

Active Member
Joined
Dec 4, 2020
Messages
271
Office Version
  1. 2016
  2. 2010
hello
I would match data between two sheets based on matching columns B,C,D together , then should add the values from sheet RES to sheet summary under headers BUYING and SELLING . should add the values to last column (BUYING ,SELLING) ,because evrey month insert three columns BUYING,SELLING,NET. the most important BUYING,SELLING should match data between two sheets based on columns B,C,D and put the values under headers .
SUM & ADD.xlsm
BCDEFGHIJKL
1GOODSMARKMANFACTUREREFRS.NBUYINGSELLINGNETBUYINGSELLINGNET
210W40 208LCASSURE1RS1200200200
310W40 208LENIITRE1RS1300300300
45W30 208LQ8EURE1RS1120120120
510W40 208LQ8EURE1RS1100100100
6S.AG720072000720
710W40 12x1LQ8EURM1RC1123123123
810W40 12x1LCASSURM1RC1303030
910W40 12x1LENIITRM1RC1120120120
1015W40 12x1LCASSURM1RC1000
11S.AG273027300273
125W30 12x1LQ8EURRM1CV1200200200
1310W40 4x4LQ8EURRM1CV1300300300
1410W40 4x4LCASSURRM1CV1230230230
1510W40 4x4LENIITRRM1CV1123123123
165W40 4x4LQ8EURRM1CV1456456456
175W40 4x4LCASSURRM1CV1234234234
185W40 4x4LENIITRRM1CV1230230230
1920W50 4x4LQ8EURRM1CV1123123123
2020W50 4x4LCASSURRM1CV1560560560
2120W50 4x4LENIITRRM1CV1120120120
225W30 4x4LQ8EURRM1CV1303030
23S.AG260602606002606
summary
Cell Formulas
RangeFormula
G11:L11,G6:L6G6=SUM(G2:G5)
I12:I22,I7:I10,I2:I5I2=G2-H2
L12:L22,L7:L10,L2:L5L2=I2+J2-K2
G23:L23G23=SUM(G12:G22)



SUM & ADD.xlsm
ABCDEFGH
1ITEMGOODSMARKMANFACTUREREFRS.NBUYINGSELLING
2110W40 12x1LQ8EURM1RC110010
3210W40 12x1LCASSURM1RC16005
4310W40 12x1LENIITRM1RC1125
5415W40 12x1LCASSURM1RC1131
6510W40 208LCASSURE1RS120040
7610W40 208LENIITRE1RS140020
875W30 208LQ8EURE1RS16020
9820W50 4x4LQ8EURRM1CV110
10920W50 4x4LCASSURRM1CV112
RES



result
from the first time
SUM & ADD.xlsm
BCDEFGHIJKL
1GOODSMARKMANFACTUREREFRS.NBUYINGSELLINGNETBUYINGSELLINGNET
210W40 208LCASSURE1RS1200200200
310W40 208LENIITRE1RS130030040020680
45W30 208LQ8EURE1RS11201206020160
510W40 208LQ8EURE1RS1100100100
6S.AG7200720460401140
710W40 12x1LQ8EURM1RC112312310010213
810W40 12x1LCASSURM1RC130306005625
910W40 12x1LENIITRM1RC1120120125245
1015W40 12x1LCASSURM1RC100131131
11S.AG2730273956151214
125W30 12x1LQ8EURRM1CV1200200200
1310W40 4x4LQ8EURRM1CV1300300300
1410W40 4x4LCASSURRM1CV1230230230
1510W40 4x4LENIITRRM1CV1123123123
165W40 4x4LQ8EURRM1CV1456456456
175W40 4x4LCASSURRM1CV1234234234
185W40 4x4LENIITRRM1CV1230230230
1920W50 4x4LQ8EURRM1CV112312310133
2020W50 4x4LCASSURRM1CV156056012548
2120W50 4x4LENIITRRM1CV1120120120
225W30 4x4LQ8EURRM1CV1303030
23S.AG26060260610122604
summary
Cell Formulas
RangeFormula
G11:L11,G6:L6G6=SUM(G2:G5)
I12:I22,I7:I10,I2:I5I2=G2-H2
L12:L22,L7:L10,L2:L5L2=I2+J2-K2
G23:L23G23=SUM(G12:G22)



if I add new columns
SUM & ADD.xlsm
BCDEFGHIJKLMNO
1GOODSMARKMANFACTUREREFRS.NBUYINGSELLINGNETBUYINGSELLINGNETBUYINGSELLINGNET
210W40 208LCASSURE1RS1200200200200
310W40 208LENIITRE1RS130030040020680400201060
45W30 208LQ8EURE1RS112012060201606020200
510W40 208LQ8EURE1RS1100100100100
6S.AG7200720460401140460401560
710W40 12x1LQ8EURM1RC11231231001021310010303
810W40 12x1LCASSURM1RC13030600562560051220
910W40 12x1LENIITRM1RC1120120125245125370
1015W40 12x1LCASSURM1RC100131131131262
11S.AG2730273956151214956152155
125W30 12x1LQ8EURRM1CV1200200200200
1310W40 4x4LQ8EURRM1CV1300300300300
1410W40 4x4LCASSURRM1CV1230230230230
1510W40 4x4LENIITRRM1CV1123123123123
165W40 4x4LQ8EURRM1CV1456456456456
175W40 4x4LCASSURRM1CV1234234234234
185W40 4x4LENIITRRM1CV1230230230230
1920W50 4x4LQ8EURRM1CV11231231013310143
2020W50 4x4LCASSURRM1CV15605601254812536
2120W50 4x4LENIITRRM1CV1120120120120
225W30 4x4LQ8EURRM1CV130303030
23S.AG2606026061012260410122602
summary
Cell Formulas
RangeFormula
G11:O11,G6:O6G6=SUM(G2:G5)
I12:I22,I7:I10,I2:I5I2=G2-H2
O12:O22,O7:O10,O2:O5,L12:L22,L7:L10,L2:L5L2=I2+J2-K2
G23:O23G23=SUM(G12:G22)
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,215,404
Messages
6,124,715
Members
449,184
Latest member
COrmerod

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