hello experts !
I'm truly appreciate if any body provide me macro with this complicated project . so what I want match columns B,C,D together for sheet SUMMARY with the others sheets into column B, if they are completely matched then should add or summing if they are repeated across sheets into last two columns based on headers (BUYING,SELLING) for sheet summary , because I will insert three columns (BUYING,SELLING,NET) in sheet SUMMARY every time . as to values to brings them from the others sheets depend on headers BUYING,SELLING after matching.
as to the higlighted rows are new items . they are not existed in sheet summary with comparison the others sheets so should add them for each classification . this case is extremely complicated . it depends on matching column A across sheets with column A in sheet summary . if the item is matched in column A for all sheets with column A in sheet summary then should add into classification and sort it . if this case is impossible achieve by vba just ignore it and I will add manually.
note: when add new items from the others sheets should split into column B,C,D always contains four items then should split as the rest of items have already been existed .
the result in sheet SUMMARY
thanks in advance
I'm truly appreciate if any body provide me macro with this complicated project . so what I want match columns B,C,D together for sheet SUMMARY with the others sheets into column B, if they are completely matched then should add or summing if they are repeated across sheets into last two columns based on headers (BUYING,SELLING) for sheet summary , because I will insert three columns (BUYING,SELLING,NET) in sheet SUMMARY every time . as to values to brings them from the others sheets depend on headers BUYING,SELLING after matching.
as to the higlighted rows are new items . they are not existed in sheet summary with comparison the others sheets so should add them for each classification . this case is extremely complicated . it depends on matching column A across sheets with column A in sheet summary . if the item is matched in column A for all sheets with column A in sheet summary then should add into classification and sort it . if this case is impossible achieve by vba just ignore it and I will add manually.
note: when add new items from the others sheets should split into column B,C,D always contains four items then should split as the rest of items have already been existed .
SUM & ADD.xlsm | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | CLASSIFICATION | GOODS | MARK | MANFACTURE | REF | RS.N | BUYING | SELLING | NET | ||
2 | OIL-AS1 | 10W40 208L | CAS | SU | RE1 | RS1 | 0 | ||||
3 | 10W40 208L | ENI | IT | RE1 | RS1 | 0 | |||||
4 | 5W30 208L | Q8 | EU | RE1 | RS1 | 0 | |||||
5 | 10W40 208L | Q8 | EU | RE1 | RS1 | 0 | |||||
6 | S.AG | 0 | 0 | 0 | |||||||
7 | OIL-AS2 | 10W40 12x1L | Q8 | EU | RM1 | RC1 | 0 | ||||
8 | 10W40 12x1L | CAS | SU | RM1 | RC1 | 0 | |||||
9 | 10W40 12x1L | ENI | IT | RM1 | RC1 | 0 | |||||
10 | 15W40 12x1L | CAS | SU | RM1 | RC1 | 0 | |||||
11 | S.AG | 0 | 0 | 0 | |||||||
12 | MS-OIL1 | 5W30 12x1L | Q8 | EU | RRM1 | CV1 | 0 | ||||
13 | 10W40 4x4L | Q8 | EU | RRM1 | CV1 | 0 | |||||
14 | 10W40 4x4L | CAS | SU | RRM1 | CV1 | 0 | |||||
15 | 10W40 4x4L | ENI | IT | RRM1 | CV1 | 0 | |||||
16 | 5W40 4x4L | Q8 | EU | RRM1 | CV1 | 0 | |||||
17 | 5W40 4x4L | CAS | SU | RRM1 | CV1 | 0 | |||||
18 | 5W40 4x4L | ENI | IT | RRM1 | CV1 | 0 | |||||
19 | 20W50 4x4L | Q8 | EU | RRM1 | CV1 | 0 | |||||
20 | 20W50 4x4L | CAS | SU | RRM1 | CV1 | 0 | |||||
21 | 20W50 4x4L | ENI | IT | RRM1 | CV1 | 0 | |||||
22 | 5W30 4x4L | Q8 | EU | RRM1 | CV1 | 0 | |||||
23 | S.AG | 0 | 0 | 0 | |||||||
summary |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G23:I23,G11:I11,G6:I6 | G6 | =SUM(G2:G5) |
I12:I22,I7:I10,I2:I5 | I2 | =G2-H2 |
SUM & ADD.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | CLASSIFICATION | GOODS | BUYING | ||
2 | MS-OIL1 | 5W40 4x4L Q8 EU | 200 | ||
3 | OIL-AS1 | 10W40 208L CAS SU | 100 | ||
4 | OIL-AS1 | 10W40 208L ENI IT | 200 | ||
5 | OIL-AS2 | 10W40 12x1L CAS SU | 300 | ||
6 | OIL-AS1 | 5W30 208L Q8 EU | 30 | ||
7 | OIL-AS2 | 10W40 12x1L Q8 EU | 50 | ||
8 | OIL-AS1 | 10W40 15x1L Q8 EU | 70 | ||
9 | OIL-AS2 | 10W40 12x1L ENI IT | 55 | ||
10 | OIL-AS2 | 15W40 12x1L CAS SU | 76 | ||
11 | MS-OIL1 | 5W30 12x1L Q8 EU | 80 | ||
12 | MS-OIL1 | 10W40 4x4L Q8 EU | 90 | ||
13 | MS-OIL1 | 10W40 4x4L CAS SU | 10 | ||
14 | MS-OIL1 | 10W40 4x4L ENI IT | 20 | ||
15 | MS-OIL1 | 10W40 4x6L ENI IT | 25 | ||
16 | MS-OIL1 | 5W40 4x4L CAS SU | 120 | ||
17 | MS-OIL1 | 5W40 4x4L ENI IT | 110 | ||
18 | MS-OIL1 | 20W50 4x4L Q8 EU | 10 | ||
19 | MS-OIL1 | 20W50 4x4L CAS SU | 15 | ||
20 | MS-OIL1 | 20W50 4x4L ENI IT | 5 | ||
21 | MS-OIL1 | 5W30 4x4L Q8 EU | 20 | ||
22 | OIL-AS2 | 15W40 15x1L CAS SU | 25 | ||
sheet1 |
SUM & ADD.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | CLASSIFICATION | GOODS | BUYING | ||
2 | MS-OIL1 | 5W40 4x4L Q8 EU | 200 | ||
3 | OIL-AS1 | 10W40 208L CAS SU | 100 | ||
4 | OIL-AS1 | 10W40 208L ENI IT | 200 | ||
5 | OIL-AS2 | 10W40 12x1L CAS SU | 300 | ||
6 | OIL-AS1 | 5W30 208L Q8 EU | 30 | ||
7 | OIL-AS2 | 10W40 12x1L Q8 EU | 50 | ||
8 | OIL-AS2 | 10W40 12x1L ENI IT | 70 | ||
9 | OIL-AS2 | 15W40 12x1L CAS SU | 55 | ||
10 | OIL-AS2 | 15W40 15x1L CAS SU | 76 | ||
sheet2 |
SUM & ADD.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | CLASSIFICATION | GOODS | SELLING | ||
2 | MS-OIL1 | 5W40 4x4L Q8 EU | 10 | ||
3 | OIL-AS1 | 10W40 208L CAS SU | 20 | ||
4 | OIL-AS1 | 10W40 208L ENI IT | 20 | ||
5 | OIL-AS2 | 10W40 12x1L CAS SU | 5 | ||
6 | OIL-AS1 | 5W30 208L Q8 EU | 20 | ||
7 | OIL-AS2 | 10W40 12x1L Q8 EU | 10 | ||
sheet3 |
SUM & ADD.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | CLASSIFICATION | GOODS | SELLING | ||
2 | MS-OIL1 | 5W40 4x4L Q8 EU | 10 | ||
3 | OIL-AS1 | 10W40 208L CAS SU | 20 | ||
sheet4 |
the result in sheet SUMMARY
SUM & ADD.xlsm | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | CLASSIFICATION | GOODS | MARK | MANFACTURE | REF | RS.N | BUYING | SELLEING | NET | ||
2 | OIL-AS1 | 10W40 15x1L | Q8 | EU | 70 | 70 | |||||
3 | 10W40 208L | CAS | SU | RE1 | RS1 | 200 | 40 | 160 | |||
4 | 10W40 208L | ENI | IT | RE1 | RS1 | 400 | 20 | 380 | |||
5 | 5W30 208L | Q8 | EU | RE1 | RS1 | 60 | 20 | 40 | |||
6 | 10W40 208L | Q8 | EU | RE1 | RS1 | 0 | |||||
7 | S.AG | 730 | 80 | 650 | |||||||
8 | OIL-AS2 | 10W40 12x1L | Q8 | EU | RM1 | RC1 | 100 | 10 | 90 | ||
9 | 10W40 12x1L | CAS | SU | RM1 | RC1 | 600 | 5 | 595 | |||
10 | 10W40 12x1L | ENI | IT | RM1 | RC1 | 125 | 125 | ||||
11 | 15W40 12x1L | CAS | SU | RM1 | RC1 | 131 | 131 | ||||
12 | 15W40 15x1L | CAS | SU | 101 | 101 | ||||||
13 | S.AG | 1057 | 15 | 1042 | |||||||
14 | MS-OIL1 | 5W30 12x1L | Q8 | EU | RRM1 | CV1 | 80 | 80 | |||
15 | 10W40 4x4L | Q8 | EU | RRM1 | CV1 | 90 | 90 | ||||
16 | 10W40 4x4L | CAS | SU | RRM1 | CV1 | 10 | 10 | ||||
17 | 10W40 4x4L | ENI | IT | RRM1 | CV1 | 20 | 20 | ||||
18 | 10W40 4x6L | ENI | IT | 25 | 25 | ||||||
19 | 5W40 4x4L | Q8 | EU | RRM1 | CV1 | 200 | 20 | 180 | |||
20 | 5W40 4x4L | CAS | SU | RRM1 | CV1 | 120 | 120 | ||||
21 | 5W40 4x4L | ENI | IT | RRM1 | CV1 | 110 | 110 | ||||
22 | 20W50 4x4L | Q8 | EU | RRM1 | CV1 | 10 | 10 | ||||
23 | 20W50 4x4L | CAS | SU | RRM1 | CV1 | 15 | 15 | ||||
24 | 20W50 4x4L | ENI | IT | RRM1 | CV1 | 5 | 5 | ||||
25 | 5W30 4x4L | Q8 | EU | RRM1 | CV1 | 20 | 20 | ||||
26 | S.AG | 705 | 20 | 685 | |||||||
summary |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G13:I13,G7:I7 | G7 | =SUM(G2:G6) |
I14:I25,I8:I12,I2:I6 | I2 | =G2-H2 |
G26:I26 | G26 | =SUM(G14:G25) |
thanks in advance