Does this help?
Sub thedefense()
Dim textrange As Range, i As Long, y, ws As Worksheet, wsN As Worksheet
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
Set ws = ActiveSheet
Sheets.Add.Name = "New Sheet"
Set wsN = Sheets("New Sheet")
wsN.Cells(1, 1) = "Item"
wsN.Cells(1, 2) = "Description"
wsN.Cells(1, 3) = "Qty"
wsN.Cells(1, 4) = "Unit Price"
With ws
ReDim y(2 To .Range("A" & Rows.Count).End(3).row)
For i = UBound(y) To LBound(y) Step -1
If .Cells(i, "A") <> .Cells(i + 1, "A") Then .Rows(i + 1).Insert
Next i
For Each textrange In .Range("A2:A" & .Range("A" & Rows.Count).End(3).row).SpecialCells(2, 2).Areas
addr = textrange.Address(False, False)
wsN.Cells(Rows.Count, 2).End(3)(2) = .Range(addr).Cells(1, 1)
.Range(addr).Offset(, 1).Resize(, 4).Copy wsN.Range("A" & wsN.Range("B" & Rows.Count).End(3)(2).row)
Next textrange
.Range("A2:A" & .Range("A" & Rows.Count).End(3).row).SpecialCells(4).EntireRow.Delete
End With
wsN.Cells.Columns.AutoFit
With Application
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
End Sub
Bookmarks