I am tying to replicate an excel formula IF(A2>300,"PASS","FAIL")
using Range.Formula in VBA, but it is not working as required.
I am trying to call variables into the formula itself as shown below but it is retuing "end of statement" error. Somebody please help! Thanks
col_label = "A"
Range("B1").Formula = "=IF(" & col_label & 2" > 300, ""PASS"", ""FAIL"")"