I’m trying to enter and run this per Robs’ instructions but, when I try to run Test 1

I get “Run Time Error 438 – Object doesn’t support this prop or method” for the

‘For Each per In ppl” line.

I did enter the attribute and People class code into notebook then imported to VBA so, I think that was done correctly.

Any suggestions on how to attack this problem?

(BTW: I’m using Excel2013)

Thx,

grant

`=LARGE((A2:A17=F2)*(B2:B17=G2)*(C2:C17=H2)*(ROW(A2:A17)),SUM((A2:A17=F2)*(B2:B17=G2)*(C2:C17=H2))-I2+1)`

This is an array formula and must be entered with Ctrl+Shift+Enter, not just enter.

`SUM((A2:A17=F2)*(B2:B17=G2)*(C2:C17=H2))-I2+1`

This part takes the count of all the instances, subtracts the instance you want, and adds one. That’s because the whole formula counts from the bottom (it’s easier to use LARGE than SMALL – well, not really, I just prefer it).

We want the 2nd instance, so it takes 3 (The count) subtracts 2 (what we want) and adds 1 to get two.

It so happens that 2 is 2 from the top AND 2 from the bottom, so not a great choice of instances by me.

`=LARGE((A2:A17=F2)*(B2:B17=G2)*(C2:C17=H2)*(ROW(A2:A17)),2)`

The first argument of LARGE is an array that returns all the row numbers where all the criteria are true. It looks like this when calculated.

`{2;0;0;0;0;7;0;0;0;0;12;0;0;0;0;0}`

You can see that it returns the row numbers (2, 7, and 12) when everything is a match and zero when something doesn’t match. Then the LARGE function gets the nth largest value.

]]>I need to find the nth occurrence using multiple criteria. My criteria is date, invoice number and sku. I havent been successful creating a formula that will result with how often the sku occurs by invoice number not the sheet as a whole. Any ideas? ]]>

Meanwhile, congratulations: you have contributed eight times the value that I have!

]]>