Formatting Sheet
Hi Wouter,
I tried this but get a syntax error on the first If statement. Any
recommendations?
"Wouter HM" wrote:
Hi C,
You can try this:
Public Sub SplitOnPartnumber()
Do
If StrComp(ActiveCell.Value, ActiveCell.Offset(-1, 0).Value,
vbTextCompare) < 0 Then
ActiveCell.EntireRow.Insert xlShiftDown
ActiveCell.Value = ActiveCell.Offset(1, 0).Value
ActiveCell.Font.Color = ActiveCell.Offset(1, 0).Font.Color
Else
ActiveCell.Font.Color = ActiveCell.Interior.Color
End If
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell)
End Sub
Select the cell with the first part# and then start this macro.
HTH,
Wouter
.
|