Со всем должным уважением и благодарностью к Dy.Lee ниже, я переработал это в это
Option Explicit
Option Base 1
Sub test()
Dim Ws As Worksheet
For Each Ws In Worksheets
SplitWs2 Ws
Next Ws
End Sub
Sub SplitWs2(Ws As Worksheet)
' define the input
Dim vIN() As Variant, colIN As Integer, rowIN As Integer
vIN = Ws.Range("a1").CurrentRegion
'MsgBox ("ub=" & UBound(vDB, 1) & " by " & UBound(vDB, 2)) ' 4 rows by 7 columns
' define the output, starting out same size as input, but transposed row/column
' we need to add rows, and can only redim the last dimension
Dim vOUT() As Variant, colOUT As Integer, rowOUT As Integer
ReDim Preserve vOUT(UBound(vIN, 2), UBound(vIN, 1))
' step thru the input, columns and rows
For colIN = 1 To UBound(vIN, 2) ' to the last column
colOUT = colIN
rowOUT = 0
For rowIN = 1 To UBound(vIN, 1) ' to the last row
' look down column at each input cell for splits
Dim s As String, vS As Variant, k As Integer, rowAdd As Integer
s = vIN(rowIN, colIN)
If InStr(s, Chr(10)) Then
vS = Split(s, Chr(10)) ' vS is base zero, so add one to UBound
rowAdd = rowOUT + UBound(vS, 1) + 1 - UBound(vOUT, 2)
If rowAdd > 0 Then
ReDim Preserve vOUT(UBound(vOUT, 1), UBound(vOUT, 2) + rowAdd)
End If
For k = 0 To UBound(vS)
rowOUT = rowOUT + 1
vOUT(colOUT, rowOUT) = vS(k)
Next k
ElseIf s > "" Then
' found un-split data, so move it
rowAdd = rowOUT + 1 - UBound(vOUT, 2)
If rowAdd > 0 Then
ReDim Preserve vOUT(UBound(vOUT, 1), UBound(vOUT, 2) + rowAdd) As Variant
End If
rowOUT = rowOUT + 1
vOUT(colOUT, rowOUT) = s
'Else it is blank and skip that input cell
End If
Next rowIN
Next colIN
MsgBox (Ws.Name & " vOUT + " & UBound(vOUT, 1) & " by " & UBound(vOUT, 2))
With Ws
.UsedRange.Clear
.Range("A1").Resize(UBound(vOUT, 2), UBound(vOUT, 1)) = WorksheetFunction.Transpose(vOUT)
End With
End Sub