(by the way, the result should be put in a new sheet, next to the original)
That was the original code did
Sub trans()
Dim x, y(), i&, j&, k&
x = Sheets("IPs").Range("A2").CurrentRegion.Value
ReDim y(1 To UBound(x, 1) * UBound(x, 2), 1 To UBound(x, 2))
For i = 2 To UBound(x, 1)
For j = 1 To UBound(x, 2)
If Len(x(i, j)) Then
k = k + 1
'y(k, 1) = x(i, 1)
y(k, 1) = x(i, j)
End If
Next j
Next i
With Sheets.Add
.UsedRange.ClearContents
.Range("A2").Resize(k, UBound(x, 2)).Value = y()
.Columns.AutoFit
.Activate
End With
End Sub
Bookmarks