PDA

View Full Version : Solved: VLOOKUP the Nth Occurance



abba92
07-23-2010, 09:06 AM
:banghead:

Hello ~

I read petermoran's most excellent kb article on VLOOKUP for Duplicates (http://www.vbaexpress.com/kb/getarticle.php?kb_id=8)but sadly, my information is not a list of dates.

I have a list of sales people and want to find their highest and second highest sales weeks. Column A on the "master list" tab contains the sales person's number. Column B contains their highest weeks (and there may be multiple for the same sales person). On the "list" tab I want to report each sales person's highest and second highest weeks.

Is this possible?

I've attached an example

austenr
07-23-2010, 09:38 AM
How about:

=vlookup(max(, etc.

abba92
07-23-2010, 09:45 AM
Hey austenr (love Red Green, excellent show) ~

That's wonderful, thanks, but doesn't seem to work if there are duplicates (there are a few). Unless I'm doing something wrong, which is entirely likely.

Thanks!

abba92
07-23-2010, 09:56 AM
Please disregard. I found a way to work around it using a "COUNTIF" function (for example, COUNTIF($D319:D$319,D319)&" "&D319) which works fantastically.

Thank you for your help, regardless!