t1000bogart
New Member
- Joined
- Dec 6, 2011
- Messages
- 3
Greetings!
I have an Excel 2007 *.xlsx file that is an extract from another program. In each row, each of the cells from "A" through "I" are filled with supporting data. In the cell in the "J" column, I have from none to many references to test case numbers. If there is more than one test case number, they are separated in cell "J" by a line feed character (vbLf?).
I need a macro that will skip row 1, and will loop from row 2 through the last row in the file. If the cell in the "J" column is blank or contains only 1 test case number, the macro just proceeds to the next row. If the cell in the "J" column contains more 2 or more test case numbers, the macro will create a new row, duplicate the data in rows "A" through "I" and then keep working until all the entries in the "J" cell are parsed out.
A sample row 4 in the source file would look like this:
Cells A4 through I4: Contain supporting data
Cell J4:
366
381
382
383
384
385
After the macro runs, rows 4 through 9 would look like this:
Cells A4 through I4: Contain supporting data
Cells A5 through I5: Contain supporting data
Cells A6 through I6: Contain supporting data
Cells A7 through I7: Contain supporting data
Cells A8 through I8: Contain supporting data
Cells A9 through I9: Contain supporting data
Cell J4: 366
Cell J5: 381
Cell J6: 382
Cell J7: 383
Cell J8: 384
Cell J9: 385
Can someone provide me with a quick macro to get this done? I would have preferred to attach a sample file, but the forum won't let me post attachments yet.
Thanks!
Paul
I have an Excel 2007 *.xlsx file that is an extract from another program. In each row, each of the cells from "A" through "I" are filled with supporting data. In the cell in the "J" column, I have from none to many references to test case numbers. If there is more than one test case number, they are separated in cell "J" by a line feed character (vbLf?).
I need a macro that will skip row 1, and will loop from row 2 through the last row in the file. If the cell in the "J" column is blank or contains only 1 test case number, the macro just proceeds to the next row. If the cell in the "J" column contains more 2 or more test case numbers, the macro will create a new row, duplicate the data in rows "A" through "I" and then keep working until all the entries in the "J" cell are parsed out.
A sample row 4 in the source file would look like this:
Cells A4 through I4: Contain supporting data
Cell J4:
366
381
382
383
384
385
After the macro runs, rows 4 through 9 would look like this:
Cells A4 through I4: Contain supporting data
Cells A5 through I5: Contain supporting data
Cells A6 through I6: Contain supporting data
Cells A7 through I7: Contain supporting data
Cells A8 through I8: Contain supporting data
Cells A9 through I9: Contain supporting data
Cell J4: 366
Cell J5: 381
Cell J6: 382
Cell J7: 383
Cell J8: 384
Cell J9: 385
Can someone provide me with a quick macro to get this done? I would have preferred to attach a sample file, but the forum won't let me post attachments yet.

Thanks!
Paul