Range("N8").FormulaArray = "=IF(OR(ISBLANK(INDEX(DoneLast!$O$8:$O$" & OldCnt & ",MATCH(1,(A8=DoneLast!$A$8:$A$" & OldCnt & ")*(D8=DoneLast!$D$8:$D$" & OldCnt & "),0))),ISNA(INDEX(DoneLast!$O$8:$O$" & OldCnt & ",MATCH(1,(A8=DoneLast!$A$8:$A$" & OldCnt & ")*(D8=DoneLast!$D$8:$D$" & OldCnt & "),0)))),""No"",INDEX(DoneLast!$O$8:$O$" & OldCnt & ",MATCH(1,(A8=DoneLast!$A$8:$A$" & OldCnt & ")*(D8=DoneLast!$D$8:$D$" & OldCnt & "),0)))"
=IF(OR(ISBLANK(INDEX(DoneLast!$O$8:$O$23,MATCH(1,(A8=DoneLast!$A$8:$A$23)*(D8=DoneLast!$D$8:$D$23),0))),ISNA(INDEX(DoneLast!$O$8:$O$23,MATCH(1,(A8=DoneLast!$A$8:$A$23)*(D8=DoneLast!$D$8:$D$23),0)))),"No",INDEX(DoneLast!$O$8:$O$23,MATCH(1,(A8=DoneLast!$A$8:$A$23)*(D8=DoneLast!$D$8:$D$23),0)))
If I type the formula (as in 2nd part) directly into a cell and press CTRL+SHIFT+ENTER I get the right results, but when I try it in a macro (1st part) I get "Unable to set the FormulaArray property of the range class(OldCnt at this point equals 23.
It's going to be something silly I've done again isn't it?
Help appreciated
=IF(OR(ISBLANK(INDEX(DoneLast!$O$8:$O$23,MATCH(1,(A8=DoneLast!$A$8:$A$23)*(D8=DoneLast!$D$8:$D$23),0))),ISNA(INDEX(DoneLast!$O$8:$O$23,MATCH(1,(A8=DoneLast!$A$8:$A$23)*(D8=DoneLast!$D$8:$D$23),0)))),"No",INDEX(DoneLast!$O$8:$O$23,MATCH(1,(A8=DoneLast!$A$8:$A$23)*(D8=DoneLast!$D$8:$D$23),0)))
If I type the formula (as in 2nd part) directly into a cell and press CTRL+SHIFT+ENTER I get the right results, but when I try it in a macro (1st part) I get "Unable to set the FormulaArray property of the range class(OldCnt at this point equals 23.
It's going to be something silly I've done again isn't it?
Help appreciated