Código:
Sub SepararSaltosDeLinea()
Dim S As Range, D As Range, P As Variant, i As Long, j As Long, x As Long, F As String
On Error Resume Next
Set S = Application.InputBox("Rango que se desea separar", "Aprendiendo ẽXcel365", Type:=8)
On Error GoTo 0
If S Is Nothing Then Exit Sub
On Error Resume Next
Set D = Application.InputBox("Celda a partir de la cual se enlistará:", "Aprendiendo ẽXcel365", Type:=8)
On Error GoTo 0
If D Is Nothing Then Exit Sub
F = UCase(InputBox("¿Enlistar horizontalmente (H) o verticalmente (V)?", "Aprendiendo ẽXcel365"))
If F <> "H" And F <> "V" Then
MsgBox "Opción inválida. Solo se permite H, h, V o v."
Exit Sub
End If
x = 0
For Each cell In S
P = Split(cell.Value, Chr(10))
For i = LBound(P) To UBound(P)
If F = "H" Then
D.Offset(x, i).Value = P(i)
Else
D.Offset(x + i, 0).Value = P(i)
End If
Next i
x = x + IIf(F = "H", 1, UBound(P) - LBound(P) + 1)
Next cell
If F = "H" Then
Set D = D.Resize(1, x)
Else
Set D = D.Resize(x, 1)
End If
End Sub