EngSantiago
New Member
- Joined
- Mar 19, 2014
- Messages
- 17
- Office Version
- 365
- Platform
- Windows
Hello coders,
I'm working on macro do fix some columns and report but I'm stuck at the following. The below is an example of the report but depending on the report, it may have over 1K rows. The serial numbers on column 4 are associated with the Part number on column 2. That is, the serial numbers with level 2 on column 1 belong to the part number with level 1 above that is above the serial numbers. I would like to copy the data on columns 2 and 3 in the empty cells below for each serial number and later on delete all the rows with level 1. The amount of serial numbers per Part Number varies so I think a loop will do the trick but I just don't know how where to begin as I have never had to create a loop before.
The output should look like this:
Any help is appreciated. I'll be trying a couple of things in the mean time.
Thanks
I'm working on macro do fix some columns and report but I'm stuck at the following. The below is an example of the report but depending on the report, it may have over 1K rows. The serial numbers on column 4 are associated with the Part number on column 2. That is, the serial numbers with level 2 on column 1 belong to the part number with level 1 above that is above the serial numbers. I would like to copy the data on columns 2 and 3 in the empty cells below for each serial number and later on delete all the rows with level 1. The amount of serial numbers per Part Number varies so I think a loop will do the trick but I just don't know how where to begin as I have never had to create a loop before.
Level | Part Number | QTY | Serial Number |
0 | 555555555-009 | ||
1 | 777777777-001 | 1 ea | |
2 | 04025C103K | ||
2 | 04025C103L | ||
2 | 04025C103M | ||
1 | 666666666-001 | 3 ea | |
2 | 12065C103K | ||
2 | 12065C103L | ||
2 | 12065C103M | ||
2 | 12065C103N |
The output should look like this:
Level | Part Number | QTY | Serial Number |
0 | |||
2 | 777777777-001 | 1 ea | 04025C103K |
2 | 777777777-001 | 1 ea | 04025C103L |
2 | 777777777-001 | 1 ea | 04025C103M |
2 | 666666666-001 | 2 ea | 12065C103K |
2 | 666666666-001 | 2 ea | 12065C103L |
2 | 666666666-001 | 2 ea | 12065C103M |
2 | 666666666-001 | 2 ea | 12065C103N |
Any help is appreciated. I'll be trying a couple of things in the mean time.
Thanks