Try this:
Code
-------------------
Sub test()
' Inserts Early, On Time, or Late
Range("N2").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(0, 1).Select
'<start fix
' This is the only line I altered
' I removed the additional " 's from the end
'-------------------------------------------------------
ActiveCell.FormulaR1C1 = "=IF(RC[-1]5,""Early"",IF(RC[-1]=0,""On Time"",IF(RC[-1]<0,""Late"")))"
'-------------------------------------------------------
'</end fix
ActiveCell.Offset(1, -1).Select
End If
Loop Until IsEmpty(ActiveCell) = True
End Sub
-------------------
let me know how it goes
Mik
--
Message posted from
http://www.ExcelForum.com