stevenblanc
Registered User.
- Local time
- Today, 11:22
- Joined
- Jun 27, 2011
- Messages
- 103
Hey folks,
So I have a raw data dump from my server which unfortunately uses two rows for each record, with the second row containing data in only one cell.
The cell above this one data item has a useless piece of data which i would like to replace with it. Currently I have the functionality I need using copy and paste:
This systematically duplicates every even row into the odd row preceding it. However, it is awfully time consuming particularly for larger ranges of i.
This sub routine is called during a longer formatting process which handles screenupdating. So screenupdating is off while this running. However it damages the seemlessness of the process.
Any direction as to a more efficient method would be greatly appreciated.
Cheers,
Steven
So I have a raw data dump from my server which unfortunately uses two rows for each record, with the second row containing data in only one cell.
The cell above this one data item has a useless piece of data which i would like to replace with it. Currently I have the functionality I need using copy and paste:
Code:
Sub MoveData()
Dim rng1, rng2 As Range
Dim i As Integer
i = 1
For i = 1 To 150
Set rng1 = Range("F" & i)
Set rng2 = Range("F" & i + 1)
rng2.Copy
rng1.PasteSpecial (xlPasteValues)
i = i + 1
Next i
End Sub
This systematically duplicates every even row into the odd row preceding it. However, it is awfully time consuming particularly for larger ranges of i.
This sub routine is called during a longer formatting process which handles screenupdating. So screenupdating is off while this running. However it damages the seemlessness of the process.
Any direction as to a more efficient method would be greatly appreciated.
Cheers,
Steven