View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Crowbar via OfficeKB.com Crowbar via OfficeKB.com is offline
external usenet poster
 
Posts: 128
Default Insert formula with code dynamically

Dim LastRow As Long
Dim RowNdx As Long
Dim OldVal As String

LastRow = Cells(Rows.Count, "I").End(xlUp).Row
OldVal = Range("C1")
For RowNdx = 5 To LastRow
If Cells(RowNdx, "I").Value = "" Then
Cells(RowNdx, "C").Value = OldVal
Else
OldVal = Cells(RowNdx, "C").Value
End If
Next RowNdx

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200601/1