![]() |
|
#5
|
|||
|
|||
|
Assuming data starts in A2, a comma is the separator and no event code for the sheet,
on a copy of your workbook, paste this into a standard module and give it a try, alter the sheet name as required Code:
Sub Testing_1()
Dim lr As Long, i As Integer, j As Integer, ray
Application.ScreenUpdating = False
With Sheets("Sheet1")
lr = .Range("A" & Rows.Count).End(xlUp).Row
For i = lr To 2 Step -1
ray = Split(.Cells(i, 4).Value, ",")
If UBound(ray) > 0 Then
.Range("A" & i).Resize(, 4).Copy
.Range("A" & i + 1).Resize(UBound(ray), 4).Insert xlShiftDown
For j = LBound(ray) To UBound(ray)
.Cells(i, 4).Offset(j).Value = Trim(ray(j))
Next j
End If
Next i
End With
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to find duplicate rows in a huge excel file containing 500000 rows | Stc25234 | Excel Programming | 2 | 06-23-2017 10:51 AM |
| eliminating blan rows between cells in a column cantaining data | FUGMAN | Excel Programming | 6 | 03-01-2017 07:35 AM |
Merge duplicate rows but retain data from one column
|
Willem113 | Excel | 1 | 09-21-2016 05:42 PM |
| how to split merged data into vertical saperate cells | cheekugreat | Excel | 5 | 10-11-2014 05:53 AM |
| Losing rows when pasting split cells | Gitley | Word Tables | 1 | 01-15-2013 07:49 AM |