Howdy,

I'm try to use the following code in a macro to help properly format a document but I keep getting a compile error, Sub or Function not defined. Any tips?

Thanks,

RowIndex = 2

'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX LOOP START XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Do While Worksheets(1).Cells(RowIndex, 1).Value <> "" ' loop until above line is empty.
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

If IsNonText(Worksheets(1).Cells(RowIndex, 9).Value) = True Then
Range(Cells(RowIndex, 8), Cells(RowIndex, 8)).Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
End If
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
RowIndex = RowIndex + 1
Loop