MEUserII
Board Regular
- Joined
- Oct 27, 2017
- Messages
- 91
- Office Version
- 365
- 2021
- 2019
- 2016
- 2013
- Platform
- Windows
I am looking to see if anyone might have a macro for data that has blank rows inserted between data?
For example beginning with this:
<tbody>
</tbody>
I use the following insert blank rows macro to insert three blank rows:
And now need to copy the data from each "data row" to the blank rows inserted to end up with the following:
<tbody>
</tbody>
What macro would I use to be able to do this?
For example beginning with this:
Column_A | Column_B | Column_C | Column_D | Colum_E | |
Row_1 | ALPHA | APPLE | ABC | ||
Row_2 | BETA | ORANGE | DEF | ||
Row_3 | GAMMA | KIWI | GHI | ||
Row_4 | DELTA | COCONUT | JKL | ||
Row_5 | ECHO | LIME | MNO | ||
Row_6 | FRANK | LEMO | PQR |
<tbody>
</tbody>
I use the following insert blank rows macro to insert three blank rows:
Code:
Sub INSERTBLANKROWS()
Dim j As Long
Dim r As Range
j = InputBox("Enter the number of rows to be inserted")
Set r = Range("A1")
Do While r.Value <> ""
Set r = r.Offset(1, 0)
For i = 1 To j
r.EntireRow.Insert
Next
Loop
End Sub
And now need to copy the data from each "data row" to the blank rows inserted to end up with the following:
Column_A | Column_B | Column_C | Column_D | Colum_E | |
Row_1 | ALPHA | APPLE | ABC | ||
Row_2 | ALPHA | APPLE | ABC | ||
Row_3 | ALPHA | APPLE | ABC | ||
Row_4 | ALPHA | APPLE | ABC | ||
Row_5 | BETA | ORANGE | DEF | ||
Row_6 | BETA | ORANGE | DEF | ||
Row_7 | BETA | ORANGE | DEF | ||
Row_8 | BETA | ORANGE | DEF |
<tbody>
</tbody>
What macro would I use to be able to do this?
Last edited: