View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Wouter HM Wouter HM is offline
external usenet poster
 
Posts: 99
Default Formatting Sheet

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