Это основано на предположении, что ваши исходные данные все еще перечислены в направлении столбца.
Sub test2()
Dim Ws As Worksheet
Dim toWs As Worksheet
Dim vDB, vR()
Dim rngDB As Range
Dim i As Long, j As Long, n As Long
Dim r As Long, c As Long, k As Long
Set Ws = Sheets(1)
Set toWs = Sheets(2)
Set rngDB = Ws.Range("a1").CurrentRegion
vDB = rngDB
r = UBound(vDB, 1)
c = UBound(vDB, 2)
For j = 2 To c
n = n + 1
'ReDim Preserve vR(1 To 4, 1 To n)
ReDim Preserve vR(1 To 5, 1 To n)
vR(1, n) = vDB(1, j)
vR(2, n) = vDB(2, j)
vR(3, n) = vDB(3, j)
vR(4, n) = vDB(4, j)
vR(5, n) = vDB(r, j) 'added insurance
'For i = 5 To r
For i = 5 To r - 1
If vDB(i, j) <> "" Then
n = n + 1
ReDim Preserve vR(1 To 5, 1 To n)
vR(4, n) = vDB(i, j)
End If
Next i
Next j
With toWs
k = .UsedRange.Rows.Count + 1
'.Range("a" & k).Resize(n, 4) = WorksheetFunction.Transpose(vR)
.Range("a" & k).Resize(n, 5) = WorksheetFunction.Transpose(vR)
End With
End Sub
Лист1
Лист2