abdo meghari
Well-known Member
- Joined
- Aug 3, 2021
- Messages
- 651
- Office Version
- 2019
hello
I have two sheets contains data and some times contain duplicate item what I want show data in sheet output ,should match between two sheets based on column B and if there are duplicates item then should merge for each sheet individual before subtraction between two sheet . so when merge should just be for columns F(QTY), H(TOTAL) should ignore column G(PRICE) I do not need it after merging should subtract based on column B between two sheets .
for instance BSJ100 QTY should merge in sheet BR to become (120+100=220 QTY ) and in sheet JAN (10+100=110) when subtract in sheet output should be 110 as in row2 . as to column H( TOTAL) , should merge in sheet BR to become (25200+23500=48700) , and in sheet JAN (2100+23500=25600)when subtract in sheet output should be 23100 as in row2 .
result
note: whwn subtraction should ignore items are new(this means if there is existed in one of sheet and not existed in other sheet)
my data are 9000 rows for both sheets .
I have two sheets contains data and some times contain duplicate item what I want show data in sheet output ,should match between two sheets based on column B and if there are duplicates item then should merge for each sheet individual before subtraction between two sheet . so when merge should just be for columns F(QTY), H(TOTAL) should ignore column G(PRICE) I do not need it after merging should subtract based on column B between two sheets .
for instance BSJ100 QTY should merge in sheet BR to become (120+100=220 QTY ) and in sheet JAN (10+100=110) when subtract in sheet output should be 110 as in row2 . as to column H( TOTAL) , should merge in sheet BR to become (25200+23500=48700) , and in sheet JAN (2100+23500=25600)when subtract in sheet output should be 23100 as in row2 .
BRAND .xlsm | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | DATE | CODE | BRAND | TYPE | ORIGIN | QTY | PRICE | TOTAL | ||
2 | 1/1/2022 | BSJ100 | BS 1200R20 | G580 | THI | 120.00 | 210.00 | 25,200.00 | ||
3 | 1/2/2022 | BSJ101 | BS 1200R20 | G580 | JAP | 100.00 | 230.00 | 23,000.00 | ||
4 | 1/3/2022 | BSJ100 | BS 1200R20 | G580 | THI | 100.00 | 235.00 | 23,500.00 | ||
5 | 1/4/2022 | BSJ102 | BS 1400R20 | VSJ | JAP | 120.00 | 400.00 | 48,000.00 | ||
6 | 1/5/2022 | BSJ101 | BS 1200R20 | G580 | JAP | 200.00 | 240.00 | 48,000.00 | ||
7 | 1/6/2022 | BSJ107 | DT 315/80R22.5 | R184 | JAP | 10.00 | 330.00 | 3,300.00 | ||
8 | 1/7/2022 | BSJ108 | DT 315/80R22.5 | G580 | THI | 20.00 | 380.00 | 7,600.00 | ||
9 | 1/8/2022 | BSJ107 | DT 315/80R22.5 | R184 | JAP | 10.00 | 350.00 | 3,500.00 | ||
10 | 1/9/2022 | BSJ104 | DT 13R22.5 | R187 | JAP | 100.00 | 230.00 | 23,000.00 | ||
11 | 1/10/2022 | BSJ 105 | BS 195/70R15C | R623 | JAP | 50.00 | 100.00 | 5,000.00 | ||
BR |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H11 | H2 | =F2*G2 |
BRAND .xlsm | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | DATE | CODE | BRAND | TYPE | ORIGIN | QTY | PRICE | TOTAL | ||
2 | 2/2/2022 | BSJ104 | DT 13R22.5 | R187 | JAP | 100.00 | 260.00 | 26,000.00 | ||
3 | 2/3/2022 | BSJ100 | BS 1200R20 | G580 | THI | 10.00 | 210.00 | 2,100.00 | ||
4 | 2/4/2022 | BSJ101 | BS 1200R20 | G580 | JAP | 20.00 | 230.00 | 4,600.00 | ||
5 | 2/5/2022 | BSJ100 | BS 1200R20 | G580 | THI | 100.00 | 235.00 | 23,500.00 | ||
6 | 2/6/2022 | BSJ102 | BS 1400R20 | VSJ | JAP | 120.00 | 400.00 | 48,000.00 | ||
7 | 2/7/2022 | BSJ103 | BS 1100R20 | R187 | JAP | 220.00 | 210.00 | 46,200.00 | ||
8 | 2/8/2022 | BSJ102 | BS 1400R20 | VSJ | JAP | 120.00 | 410.00 | 49,200.00 | ||
9 | 2/9/2022 | BSJ 105 | BS 195/70R15C | R623 | JAP | 100.00 | 100.00 | 10,000.00 | ||
10 | 2/10/2022 | BSJ 106 | BS 225/70R15C | R623 | JAP | 120.00 | 110.00 | 13,200.00 | ||
JAN |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H10 | H2 | =F2*G2 |
result
BRAND .xlsm | |||||||||
---|---|---|---|---|---|---|---|---|---|
F | G | H | I | J | K | L | |||
1 | ITEM | CODE | BRAND | TYPE | ORIGIN | QTY | TOTAL | ||
2 | 1 | BSJ100 | BS 1200R20 | G580 | THI | 110.00 | 23,100.00 | ||
3 | 2 | BSJ101 | BS 1200R20 | G580 | JAP | 280.00 | 66,400.00 | ||
4 | 3 | BSJ102 | BS 1400R20 | VSJ | JAP | 120.00 | 0.00 | ||
5 | 4 | BSJ104 | DT 13R22.5 | R187 | JAP | 0.00 | 3,000.00 | ||
6 | 5 | BSJ 105 | BS 195/70R15C | R623 | JAP | 50.00 | 5,000.00 | ||
OUTPUT |
note: whwn subtraction should ignore items are new(this means if there is existed in one of sheet and not existed in other sheet)
my data are 9000 rows for both sheets .