Hi Mick, here is an explanation of R1C1 notation, as well as what you could change your formula to:
'In the following explanation, x would be a whole number
'
'R by itself means "same row"
'Rx means Row x
'R[x] means x offset from current row, R[1] means "one row down", R[-1] means "one row up"
'The same applies for C, Cx, and C[x]
'Your Code
Cells(i, LastCol + j - 1)..FormulaR1C1 = _
"=IF(IF(ISERROR(MATCH(RC" & LastCol + 1 & ",RC[-" & LastCol - 1 & "],0)),0,1),1, )"
'"RC" & LastCol + 1 <-- Same row, Last Column + 1
' This is the same as you saying "Cells(i, Last Col + 1).Address"
'
'"RC[-" & Last Col - 1 & "]" <-- Same row, (LastCol-1) columns to the left
' This is the same as you saying "Cells(i, j).Address & ":" & Cells(i, j).Address
But overall, I would probably change your code to:
Dim CLL As Range, RG As Range
Set RG = Range(Cells(2, 4 + LastCol), Cells(LastRow - 1, 2 * (LastCol - 1)))
RG.FormulaR1C1 = "=IF(IF(ISERROR(MATCH(RC" & LastCol + 1 & ",RC[-" & LastCol - 1 & "],0)),0,1),1, )"
'Loops through each cell in that region with a formula that returns a number
For Each CLL In RG.SpecialCells(xlFormulas, 1).Cells
If CLL = 0 Then CLL.ClearContents 'If the cell=0, clearcontents
Next CLL
Matt