Hi ,
I am recording my macro to input a formula , it is amending the original formula to the below but when I try and run it , it creates a syntax error.
Anyone any ideas what is causing this issue.
Thanks,
ActiveCell.FormulaR1C1 = _
"=IF(AND(ISNUMBER(SEARCH(""Mr"",RC[1]))=TRUE,ISNUMBER(SEARCH(""IENDD"",R[2]C[1]))=TRUE),""Staff ID"",IF(AND(ISNUMBER(SEARCH(""Ms"",RC[1]))=TRUE,ISNUMBER(SEARCH(""IENDD"",R[2]C[1]))=TRUE),""Staff ID"",IF(AND(ISNUMBER(SEARCH(""Miss"",RC[1]))=TRUE,ISNUMBER(SEARCH(""IENDD"",R[2]C[1]))=TRUE),""Staff ID"",IF(AND(ISNUMBER(SEARCH(""Mrs"",RC[1]))=TRUE,ISNUMBER(SEARCH(""IENDD""& _
"1]))=TRUE),""Staff ID"",IF(AND(ISNUMBER(SEARCH(""/"",RC[1]))=TRUE,ISNUMBER(SEARCH(""IENDD"",R[1]C[1]))=TRUE),""Date"",""n/a"")))))"
I am recording my macro to input a formula , it is amending the original formula to the below but when I try and run it , it creates a syntax error.
Anyone any ideas what is causing this issue.
Thanks,
ActiveCell.FormulaR1C1 = _
"=IF(AND(ISNUMBER(SEARCH(""Mr"",RC[1]))=TRUE,ISNUMBER(SEARCH(""IENDD"",R[2]C[1]))=TRUE),""Staff ID"",IF(AND(ISNUMBER(SEARCH(""Ms"",RC[1]))=TRUE,ISNUMBER(SEARCH(""IENDD"",R[2]C[1]))=TRUE),""Staff ID"",IF(AND(ISNUMBER(SEARCH(""Miss"",RC[1]))=TRUE,ISNUMBER(SEARCH(""IENDD"",R[2]C[1]))=TRUE),""Staff ID"",IF(AND(ISNUMBER(SEARCH(""Mrs"",RC[1]))=TRUE,ISNUMBER(SEARCH(""IENDD""& _
"1]))=TRUE),""Staff ID"",IF(AND(ISNUMBER(SEARCH(""/"",RC[1]))=TRUE,ISNUMBER(SEARCH(""IENDD"",R[1]C[1]))=TRUE),""Date"",""n/a"")))))"