Sub cell_to_row()
Dim cell As Range
Set cell = Application.InputBox("Select a cell with data to split into rows",
Type:=8)
If cell Is Nothing Then Exit Sub
Dim cellContent As String
Dim splitContent As Variant
Dim i As Integer
Dim startRow As Long
Dim startCol As Long
' Get the content of the cell
cellContent = cell.Value
' Split the content by line breaks
splitContent = Split(cellContent, Chr(10))
' Get the starting row and column of the cell
startRow = cell.Row
startCol = cell.Column
' Shift existing rows down to make space for new rows
Range(Cells(startRow + 1, startCol), Cells(startRow + UBound(splitContent),
startCol)).Insert Shift:=xlDown
' Populate the cells with the split content
For i = LBound(splitContent) To UBound(splitContent)
Cells(startRow + i, startCol).Value = splitContent(i)
Next i
End Sub