Don’t quite understand the quesiton here. You want to add formulas at the first empty row? If so, is there a master row which you can copy the formulas from?
You can use something like this to get the last row and adapt from there, but copying the .formula from somewhere else is better than messing aroudn with relative positions.
Sub CopyIt()
Dim lngNextRow as long
Dim wksUpdate as worksheet
set wksupdate = activesheet
lngNextRow = Get_Last_Used_Row(wksupdate) +1
wksUpdate.Cells(lngNextRow, 11).Formula = “=DAYS(Now(), I” & lngNextRow & “)”
set wksupdate = nothing
End Sub
Function Get_Last_Used_Row(ByRef wksScan As Worksheet) As Long
’ Purpose: Return last row containing any value. Distinct from UsedRange.
’
’ Revision History
’ 25/01/2017 The_Cosh Initial creation
Dim lngRow As Long
Dim lngCnt As Long
If Not wksScan Is Nothing Then
lngRow = wksScan.UsedRange.Cells(wksScan.UsedRange.Cells.Count).Row + 1
Do
lngRow = lngRow - 1
lngCnt = Application.WorksheetFunction.CountA(wksScan.Rows(lngRow))
Loop Until (lngCnt > 0) Or (lngRow = 1)
Get_Last_Used_Row = lngRow
End If ' Not wksScan Is Nothing
End Function