abdo meghari
Well-known Member
- Joined
- Aug 3, 2021
- Messages
- 651
- Office Version
- 2019
Hello,
I would merge quantity in column E for duplicates BRANDS in column D based on column C for each range contains colon for each name MOVEMENT word is existed after colon .
, but when merge QTY should be based on the same price in unit price in column F . so you will note some the same duplicates IDs contain different price , so don't merge QTY for the same duplicates IDs contain different price .
when merge data should brings column C:F from INVOICES sheet and insert TOTAL column and calculate as the formula is existed .
every time when run the macro should replace new data with old data, also should sort data for each range based on column C from small to big based on numbers . .
last thing I have many ranges contains words and suffix :
I realized error about my topic . should merge same ID based on same price, not different price.
I can't correct my topic, sorry about this mistake!!
result
I hope to don't make any mistake .
I would merge quantity in column E for duplicates BRANDS in column D based on column C for each range contains colon for each name MOVEMENT word is existed after colon .
, but when merge QTY should be based on the same price in unit price in column F . so you will note some the same duplicates IDs contain different price , so don't merge QTY for the same duplicates IDs contain different price .
when merge data should brings column C:F from INVOICES sheet and insert TOTAL column and calculate as the formula is existed .
every time when run the macro should replace new data with old data, also should sort data for each range based on column C from small to big based on numbers . .
last thing I have many ranges contains words and suffix :
I realized error about my topic . should merge same ID based on same price, not different price.
I can't correct my topic, sorry about this mistake!!
split brands.xlsm | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
2 | MOVEMENT : PURCHASING | ||||||||
3 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
4 | 2024.01.02 | 114 | 1284 | GC 1200R20 AZ0026 CHI | 80 | 895.000 | 242,560.000 | ||
5 | 1285 | GC 1200R20 AZ0183 CHI | 40 | 925.000 | |||||
6 | 1385 | GC 315/80R22.5 AT161 CHI | 20 | 735.000 | |||||
7 | 1287 | GC 315/80R22.5 AZ126 CHI | 20 | 735.000 | |||||
8 | 1294 | GC 315/80R22.5 AZ188 CHI | 20 | 745.000 | |||||
9 | 1241 | BS 1200R20 G580 JAP | 40 | 2,035.000 | |||||
10 | 1227 | BS 215/70R15C R623 THI | 8 | 425.000 | |||||
11 | 1221 | BS 205/70R15C R623 THI | 12 | 405.000 | |||||
12 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
13 | 2024.01.09 | 121 | 1287 | GC 315/80R22.5 AZ126 CHI | 14 | 735.000 | 10,290.000 | ||
14 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
15 | 2024.01.10 | 125 | 1227 | BS 215/70R15C R623 THI | 2 | 425.000 | 850.000 | ||
16 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
17 | 2024.01.20 | 148 | 1287 | GC 315/80R22.5 AZ126 CHI | 26 | 735.000 | 19,110.000 | ||
18 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
19 | 2024.01.20 | 149 | 1221 | BS 205/70R15C R623 THI | 50 | 405.000 | 391,650.000 | ||
20 | 1227 | BS 215/70R15C R623 THI | 12 | 425.000 | |||||
21 | 1241 | BS 1200R20 G580 JAP | 180 | 2,035.000 | |||||
22 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
23 | 2024.03.30 | 217 | 1285 | GC 1200R20 AZ0183 CHI | 10 | 1,225.000 | 12,250.000 | ||
24 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
25 | 2024.04.09 | 226 | 1227 | BS 215/70R15C R623 THI | 4 | 544.000 | 2,176.000 | ||
26 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
27 | 2024.04.14 | 230 | 1285 | GC 1200R20 AZ0183 CHI | 40 | 1,205.000 | 81,950.000 | ||
28 | 1284 | GC 1200R20 AZ0026 CHI | 30 | 1,125.000 | |||||
29 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
30 | 2024.04.17 | 236 | 1284 | GC 1200R20 AZ0026 CHI | 20 | 1,125.000 | 46,600.000 | ||
31 | 1285 | GC 1200R20 AZ0183 CHI | 20 | 1,205.000 | |||||
32 | MOVEMENT : SELLING | ||||||||
33 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
34 | 2024.01.24 | 561 | 1306 | BS 750R16 R230 JAP | 10 | 775.000 | 7,750.000 | ||
35 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
36 | 2024.01.24 | 562 | 1306 | BS 750R16 R230 JAP | 2 | 780.000 | 1,560.000 | ||
37 | DATE | INVOICE NO | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
38 | 2024.01.24 | 563 | 1306 | BS 750R16 R230 JAP | 2 | 780.000 | 3,100.000 | ||
39 | 1305 | BS 700R16 R230 JAP | 2 | 770.000 | |||||
40 | |||||||||
41 | SUMMARY | ||||||||
42 | TOTAL PURCHASE | 807,436.000 | |||||||
43 | TOTAL SELLING | 12,410.000 | |||||||
INVOICES |
result
split brands.xlsm | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
2 | MOVEMENT : PURCHASING | |||||||
3 | ITEM | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
4 | 1 | 1221 | BS 205/70R15C R623 THI | 62 | 405.000 | 25,110.000 | ||
5 | 2 | 1227 | BS 215/70R15C R623 THI | 22 | 425.000 | 9,350.000 | ||
6 | 3 | 1227 | BS 215/70R15C R623 THI | 4 | 544.000 | 2,176.000 | ||
7 | 4 | 1241 | BS 1200R20 G580 JAP | 220 | 2,035.000 | 447,700.000 | ||
8 | 5 | 1284 | GC 1200R20 AZ0026 CHI | 80 | 895.000 | 71,600.000 | ||
9 | 6 | 1284 | GC 1200R20 AZ0026 CHI | 50 | 1,125.000 | 56,250.000 | ||
10 | 7 | 1285 | GC 1200R20 AZ0183 CHI | 40 | 925.000 | 37,000.000 | ||
11 | 8 | 1285 | GC 1200R20 AZ0183 CHI | 10 | 1,225.000 | 12,250.000 | ||
12 | 9 | 1285 | GC 1200R20 AZ0183 CHI | 60 | 1,205.000 | 72,300.000 | ||
13 | 10 | 1385 | GC 315/80R22.5 AT161 CHI | 20 | 735.000 | 14,700.000 | ||
14 | 11 | 1294 | GC 315/80R22.5 AZ188 CHI | 20 | 745.000 | 14,900.000 | ||
15 | 12 | 1287 | GC 315/80R22.5 AZ126 CHI | 60 | 735.000 | 44,100.000 | ||
16 | MOVEMENT : SELLING | |||||||
17 | ITEM | CODE | BRAND | QTY | UNIT PRICE | TOTAL | ||
18 | 1 | 1305 | BS 700R16 R230 JAP | 2 | 770.000 | 1,540.000 | ||
19 | 2 | 1306 | BS 750R16 R230 JAP | 10 | 775.000 | 7,750.000 | ||
20 | 3 | 1306 | BS 750R16 R230 JAP | 4 | 780.000 | 3,120.000 | ||
21 | ||||||||
22 | SUMMARY | |||||||
23 | TOTAL PURCHASE | 807,436.000 | ||||||
24 | TOTAL SELLING | 12,410.000 | ||||||
RESULT |
Cell Formulas | ||
---|---|---|
Range | Formula | |
F18:F20,F4:F15 | F4 | =D4*E4 |
I hope to don't make any mistake .
Last edited: