Hi can guys can you help me with this one. Code below

Sub AddFormula()
    Set LR = Cells(Rows.Count, "C").End(xlUp).Row
    For i = 3 To LR
    If Not LR Is Nothing Then
        Cells(i, "H").Formula = "=S" & i & "+U" & i & "+F" & i & "+100"
    Else: LR.EntireRow.Delete
    End If
        Next i
End Sub
Error says object required

many thanks.