I am trying to paste a formula in Excel cell via VBA but with no luck. When i try this code it perfectly works -
ActiveSheet.Range("B7").Value = "=VLOOKUP(A7,$A$1:$B$3,2,0)"
But when i try this code
ActiveSheet.Range("B7").Value = "=VLOOKUP(CONCATENATE(VLOOKUP(LOOKUP(2,1/($A$5:A7<>""),$A$5:A7),Instructions!$A$4:$B$40,2,0),NTFS!XFC7-2),'Trial Balance'!$I$55:$J$1048576,2,0)"
it ends up with an Error 1004 Run time error - Application defined or Object defined error.
I just want the formula to be pasted into the cell any other code would work. Please help me with the reason why this error occurs, and also request you to come up with a crack or an alternative to paste the formula.
Thanks in Advance!