I'm new to VBA and need some help. I'm looking for most efficient way to create an import file based off of an Excel Spreadsheet.
Source Workbook contains a variable number of rows with 7 columns of data.
In my active workbook, I need to create 5 separate rows for EACH line of data in the Source Workbook.
In the active workbook, the letter or number in column A will always be hard-coded for all 5 rows (see example below).
In the active workbook, the values in the 2nd column & 3-5 rows will also be hard-coded (see example below).
I need to loop through this routine for as many rows that are on the Source data sheet, which varies from month-to-month.
Source Workbook
<tbody>
</tbody>
Active Workbook
<tbody>
</tbody>
Thanks in advance for any help you can throw my way. I tried recording this as a macro but I can't get the macro to keep looping through for each line of data.
Source Workbook contains a variable number of rows with 7 columns of data.
In my active workbook, I need to create 5 separate rows for EACH line of data in the Source Workbook.
In the active workbook, the letter or number in column A will always be hard-coded for all 5 rows (see example below).
In the active workbook, the values in the 2nd column & 3-5 rows will also be hard-coded (see example below).
I need to loop through this routine for as many rows that are on the Source data sheet, which varies from month-to-month.
Source Workbook
1 | A | 10 | BB | 40.00 | 20.00 | 20.00 |
2 | A | 20 | ED | 55.00 | 35.00 | 20.00 |
3 | C | 50 | AA | 100.00 | 75.00 | 25.00 |
<tbody>
</tbody>
Active Workbook
0 | 1 | BB |
1 | A | |
U | 29 | 40.00 |
U | 81 | 20.00 |
U | 82 | 20.00 |
0 | 2 | ED |
1 | A | |
U | 29 | 55.00 |
U | 81 | 35.00 |
U | 82 | 20.00 |
0 | 3 | AA |
1 | C | |
U | 29 | 100.00 |
U | 81 | 50.00 |
U | 82 | 50.00 |
<tbody>
</tbody>
Thanks in advance for any help you can throw my way. I tried recording this as a macro but I can't get the macro to keep looping through for each line of data.