hi
I need macro to merge data based on column B and sum the values in column H but the column I should calculate average price and column J =column i x column h
with ignores columns C,D with considering my data are about 2500 rows
orginal data
expected result
I need macro to merge data based on column B and sum the values in column H but the column I should calculate average price and column J =column i x column h
with ignores columns C,D with considering my data are about 2500 rows
orginal data
KarmaTest1.xlsm | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | DATE | CODE | INV-N.O | CLIENT-N.O | BRAND | TYPE | ORGIN | QTY | PRICE | TOTAL | ||
2 | 4/1/2021 | A02 | BlS1/12-021 | CC-MMSN1/12 | AC-AD1 | AA-100 | TTY1 | 10 | 140.00 | 1,400.00 | ||
3 | 4/2/2021 | A03 | BlS1/12-022 | CC-MMSN1/13 | AC-AD2 | AA-101 | TTY2 | 12 | 200.00 | 2,400.00 | ||
4 | 4/3/2021 | A04 | BlS1/12-023 | CC-MMSN1/14 | AC-AD3 | AA-102 | TTY3 | 16 | 130.00 | 2,080.00 | ||
5 | 4/4/2021 | A02 | BlS1/12-024 | CC-MMSN1/15 | AC-AD1 | AA-100 | TTY1 | 10 | 146.00 | 1,460.00 | ||
6 | 4/5/2021 | A03 | BlS1/12-025 | CC-MMSN1/16 | AC-AD2 | AA-101 | TTY2 | 12 | 200.00 | 2,400.00 | ||
7 | 4/6/2021 | A04 | BlS1/12-026 | CC-MMSN1/17 | AC-AD3 | AA-102 | TTY3 | 16 | 144.00 | 2,304.00 | ||
main |
Cell Formulas | ||
---|---|---|
Range | Formula | |
J2:J7 | J2 | =I2*H2 |
expected result
KarmaTest1.xlsm | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | ITEM | CODE | BRAND | TYPE | ORGIN | QTY | PRICE | TOTAL | ||
2 | 1 | A02 | AC-AD1 | AA-100 | TTY1 | 20 | 143.00 | 2,860.00 | ||
3 | 2 | A03 | AC-AD2 | AA-101 | TTY2 | 24 | 200.00 | 4,800.00 | ||
4 | 3 | A04 | AC-AD3 | AA-102 | TTY3 | 32 | 137.00 | 4,384.00 | ||
result |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H4 | H2 | =G2*F2 |