asked on
Sub Commas2Rows()
' hiker95, 05/18/2017, ME1006027
Dim lr As Long, r As Long, s, i As Long
Application.ScreenUpdating = False
With ActiveSheet
lr = .Cells(Rows.Count, 1).End(xlUp).Row
For r = lr To 2 Step -1
If InStr(.Range("G" & r), ", ") Then
s = Split(.Range("G" & r), ", ")
.Rows(r + 1).Resize(UBound(s)).Insert
.Range("G" & r).Resize(UBound(s) + 1) = Application.Transpose(s)
.Range("A" & r + 1 & ":F" & r + 1).Resize(UBound(s)).Value = .Range("A" & r & ":F" & r).Value
.Range("H" & r + 1 & ":J" & r + 1).Resize(UBound(s)).Value = .Range("H" & r & ":J" & r).Value
End If
Next r
End With
Application.ScreenUpdating = True
End Sub
Before.jpg