Sub tableS2Columns()
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim inRng As Range
Set ws1 = Worksheets("Before") 'Input file
Set ws2 = Worksheets("After") 'Output file
Application.ScreenUpdating = False
lc = ws1.Cells(3, Columns.Count).End(xlToLeft).Column ' column count on input file
lr2 = 1 ' Initial output eow
ws2.Range("A1:d10000").ClearContents ' Clear output area
With ws1
For c = 1 To lc Step 4 ' Loop in blocks of 4 columns
lr1 = ws1.Cells(Rows.Count, c).End(xlUp).Row ' Find last row in current block
Set inRng = .Range(.Cells(1, c), .Cells(lr1, c + 3)) ' get data in this block
inRng.Copy Destination:=ws2.Cells(lr2, "A") ' write data to columns A:C in output
lr2 = lr2 + lr1 ' increment row for next addition
Next c
End With
Application.ScreenUpdating = True
End Sub
Click "RUN" on "After"
Bookmarks