maybe it's just me, but I find the FormulaR1C1 thing quite confusing. You can use the Formula method instead, which is a bit more user friendly.

Define a variable and populate it with the last row of the data in column X. Then use that row number in the formula, like this:

```
Sub test()
Dim lastRow As Long
'Select the field to enter the formula
'Insert formula to calculate totals from job table:
'If there is only one record, use the record value, otherwise sum the whole column.
lastRow = Cells(Rows.Count, "X").End(xlUp).Row
Range("X2").Select 'R8C6 = Cell("F8") - job no.
ActiveCell.Formula = "=IF($F$8="""",X7,SUM(X7:X" & lastRow & "))"
ActiveCell.Select
End Sub
```

cheers, teylyn