LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Vlookup - Returning 2nd match

On 29 Apr., 04:48, "ozgrid.com" wrote:
Seehttp://www.ozgrid.com/VBA/ultimate-excel-lookup-function.htm

--
Regards
Dave Hawleywww.ozgrid.com"MarkinArk" wrote in message

...

Quick question on returning the 2nd match of a vlookup . *I am tracking
multiple major league baseball teams' win/loss streaks, and have the
results
listed by date. *I was doing fine, until the Mets and Dodgers had a
double-header yesterday, and now had 2 entries for that date. *I know I
can
test for multiple dates using Countif(A1:A4 4/27/2010) but don't know how
to
return the 2nd match of the row of the vlookup.
* *A * * * * * * B
4/26/2010 POSTPONED
4/27/2010 W 4-0
4/27/2010 W 10-5
4/28/2010 W 7-3


vlookup(4/27/2010, a1:b4, 2, false) * so that I get W 10-5 (where the
first
vlookup returns W 4-0). *Thanks for any help.


Mark


Hello Dave,

That's some nice piece of code.

Two suggestions: You can enhance the functionality to lookup the last
value of a range (for example Occurence = -1) or the last but one
(Occurrence = -2), etc. by changing the search direction if Occurence
is negative (and taking -Occurrence). And I would omit Column_Lookin
to shorten the code:
http://sulprobil.com/html/lookup-variants.html

Regards,
Bernd

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup Match BUT Returning #NA DaveM Excel Discussion (Misc queries) 1 December 27th 08 10:58 PM
vlookup not returning a match even when there is one karen Excel Worksheet Functions 6 July 14th 08 02:09 PM
VLookup is not returning the first match data Pogue Excel Worksheet Functions 6 December 7th 07 09:59 AM
need help with a vlookup but returning a particular match? D7ONO Excel Worksheet Functions 4 May 5th 06 02:14 PM
VLOOKUP returning LAST match Brian Ferris Excel Discussion (Misc queries) 1 April 4th 05 02:00 PM


All times are GMT +1. The time now is 11:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"