Here are the requirements I am trying to figure out a VBA code for.
Please help write a VBA code based on the requirements below.
Thank you.
Please help write a VBA code based on the requirements below.
Thank you.
Copy from WRKBOOK 1 to WRKBOOK 2 |
WRKBOOK 1 Columns G, H, I, J - Must create a new line if there is an entry, as shown in WRKBOOK 2 |
WRKBOOK 2 Columns A, B, C, D, E, F remains the same, only the quantity changes |
Want an easy-to-modify VBA script so if there are additional columns added after WRKBOOK 1 Col F, or I, or j etc., can be easily modified. |
EXAMPLE | EXAMPLE | EXAMPLE | EXAMPLE | EXAMPLE | EXAMPLE | code1 | code2 | code3 | code4 |
TYPE | state | ZONE | abs1 | resp | ems | DOA | |||
LINE | DIGIT | NOM | Auto | Auto | Auto | QTY | QTY | QTY | QTY |
1 | 11111 | Smith | tea | BC | red | 2 | 9 | ||
2 | 44444 | Drumph | snod | DE | orange | 1 | |||
3 | 56789 | Chuck | dok | ZA | blue | 1 | 2 | 3 | 5 |
WRKBOOK 1 | |||||||||
LINE | DIGIT | NOM | TYPE | STATE | ZONE | DIR | QTY* |
1 | 11111 | Smith | tea | BC | red | abs1 | 2 |
1 | 11111 | Smith | tea | BC | red | ems | 9 |
2 | 44444 | Drumph | snod | DE | orange | ems | 1 |
3 | 56789 | Chuck | dok | ZA | blue | abs1 | 1 |
3 | 56789 | Chuck | dok | ZA | blue | resp | 2 |
3 | 56789 | Chuck | dok | ZA | blue | ems | 3 |
3 | 56789 | Chuck | dok | ZA | blue | DOA | 5 |
WRKBOOK 2 | |||||||