index/match with multiple criteria

Chris1505

Board Regular
Joined
Aug 7, 2008
Messages
60
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
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
NEver put a formula in a thread without supplying a table with sample data and explaining what you want to accomplish. No one can solve it like this.
 
Upvote 0
Thanks VoG, I'll have a "play" and see if I can work around it, maybe break it down into 2 formulas in 2 columns and then put e correct result into a 3rd column-not elegant but if it works .....
 
Upvote 0

Forum statistics

Threads
1,214,524
Messages
6,120,049
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top