![]() |
|
|
Thread Tools | Display Modes |
#4
|
||||
|
||||
![]()
Try:
Code:
Sub Demo() Application.ScreenUpdating = False Dim i As Long, j As Long, k As Long With ThisWorkbook.Worksheets("Sheet1").UsedRange For i = .Cells.SpecialCells(xlCellTypeLastCell).Row To 1 Step -1 If InStr(.Cells(i, 5).Value, "<br>") > 0 Then For j = UBound(Split(.Cells(i, 5).Value, "<br>")) To 1 Step -1 .Cells(i + 1, 5).EntireRow.Insert Shift:=xlShiftDown For k = 1 To 4 .Cells(i + 1, k).Value = .Cells(i, k).Value Next .Cells(i + 1, 5).Value = Split(.Cells(i, 5).Value, "<br>")(j) Next .Cells(i, 5).Value = Split(.Cells(i, 5).Value, "<br>")(0) End If Next End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
data, macros |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
MMT | Excel | 9 | 02-12-2015 09:18 PM |
copying nested if over multiple rows where one value stays fixed | charles_cat | Excel | 1 | 01-23-2015 01:30 AM |
Copying data from one cell to another where condition is third cell | fairyca | Excel | 4 | 03-30-2014 08:22 AM |
![]() |
dennist77 | Word | 1 | 10-29-2013 11:39 PM |
![]() |
mrphilk | Excel | 4 | 06-10-2010 11:52 PM |