This does not work:
But how do use a variable in VBA, R1C1 style
Code:
LR = Cells(Rows.Count, 1).End(xlUp).Row
'Range("B2").FormulaR1C1 = "=COUNTIF(R2C1:R&"LR"&C1,RC[-1])"
Range("B2").Formula = "=COUNTIF($A$2:$A$LR, A2)"
Selection.AutoFill Destination:=Range("B2:B25")
Range("B2:B25").Select