I have just changed my code where I put a formula into a cell and it now brings up Runtime error 1004 (Application defined or Object defined error). My new code is:
ActiveCell.FormulaR1C1 = _
"=IF(IsError(VLOOKUP(RC[3],TransactionTypes!C:C[1],2,0)),""MISC"",IF(ISNUMBER(SEARCH(""AX"",(RC[2],2))),""Amex"",VLOOKUP(RC[3],TransactionTypes!C:C[1],2,0)))"
The code that previously worked fine was:
'ActiveCell.FormulaR1C1 = _
"=IF(IsError(VLOOKUP(RC[3],TransactionTypes!C:C[1],2,0)),""MISC"",IF(LEFT(RC[2],2)=""AX"",""Amex"",VLOOKUP(RC[3],TransactionTypes!C:C[1],2,0)))"
The part I changed was IF(LEFT(RC[2],2)=""AX"",""Amex"" into IF(ISNUMBER(SEARCH(""AX"",(RC[2],2))),""Amex"" but I can't see why this is throwing up the error.