I have the following formula that works fine, but when I put it into VBA I get an "Application-defined or Object-defined error.
Range("D8").Select
ActiveCell.Formula = "=IF(ISERROR(INDEX(DATA!$A$5:DATA!$BB$200,MATCH($B8,DATA!$A$5:$A$200,0),MATCH(D$6,DATA!$A$5:$BB$5,0))*(1+'PLANNED SALES %'!D8)),"",(INDEX(DATA!$A$5:DATA!$BB$200,MATCH($B8,DATA!$A$5:$A$200,0),MATCH(D$6,DATA!$A$5:$BB$5,0))*(1+'PLANNED SALES %'!D8)))"
What is wrong with it and how do I get it to work in VBA?
Thanks
Range("D8").Select
ActiveCell.Formula = "=IF(ISERROR(INDEX(DATA!$A$5:DATA!$BB$200,MATCH($B8,DATA!$A$5:$A$200,0),MATCH(D$6,DATA!$A$5:$BB$5,0))*(1+'PLANNED SALES %'!D8)),"",(INDEX(DATA!$A$5:DATA!$BB$200,MATCH($B8,DATA!$A$5:$A$200,0),MATCH(D$6,DATA!$A$5:$BB$5,0))*(1+'PLANNED SALES %'!D8)))"
What is wrong with it and how do I get it to work in VBA?
Thanks