Hello!
I copied some data (flight information) from a website to create a .txt file and opened it in Excel with tab and space delimiters. The data has imported so that it is all in the first column as a long list. My data is in blocks of 7 cells and I want to display each flight as a single row with seven columns.
I was originally copying the seven vertical cells, and then using paste transpose to make the row next to the first cell of the block. I then delete the six rows beneath the first cell and start again with the next seven rows. I recorded a macro of this and tried to play around with it to no avail.
I'm new to VBA so any help would be very much appreciated!
Thanks!
Sub Transpose()
'
' Transpose Macro
'
'
'
Dim i As Integer
For i = 27 To 52
Range(Cell(i, 1), Cell(i + 7, 1)).Select
Selection.Copy
Range(Cell(i, 2)).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Rows(Cell(i + 1, 1), Cell(i + 7, 1)).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
Next i
End Sub
Bookmarks