View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
sp00nix[_5_] sp00nix[_5_] is offline
external usenet poster
 
Posts: 1
Default Nested If Then

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