You cannot mix-and-match xlA1 cell references with xlR1C1 cell references. A5 is R5C1 in xlR1C1 syntax.
ActiveCell.FormulaR1C1 = "=if('Sheet 2'!RC>'Sheet 2'!R5C1,""PASS"", ""FAIL"")"
Now in this formula, the RC is a relative row/relative column reference to the same cell on 'Sheet 2' that the active cell on the active sheet is on. However, the 'Sheet 2'!R5C1 reference will be absolute row/absolute column like 'Sheet 2'!$A$5.
If you require a relative row/relative column reference to 'Sheet 2'!A5 then you need to use .Formula instead of .FormulaR1C1 and reference the activecell's address in an xlA1 manner.
with ActiveCell
.Formula = "=if('Sheet 2'!" & .address(0, 0) & ">'Sheet 2'!A5,""PASS"", ""FAIL"")"
end with