View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] knox5731@gmail.com is offline
external usenet poster
 
Posts: 15
Default Embedded vlookup question

Nope that didn't work...it still comes back with 'NA', I'm not sure
what is going on.......and sometimes it pulls the row above its data.


Tom Ogilvy wrote:
Vlookup will only pull back the value for the row with the first matching
value for the lookup column. So in the example you show, that would be the
correct result.

As long as your data is sorted by descending date, it should work.

--
Regards,
Tom Ogilvy


" wrote:

I have a vlookup that isn't working because it would pull back multiple
rows. How do I tell the vlookup to pull back the row with the most
recent date?

Example of existing query:

=VLOOKUP($A$22,'Tgt Inv'!$B:$F,4,FALSE)

Will pull back following rows since they all have 302 as the delimiter.


NA 302 2/14/2006 340 670 4.6
NA 302 1/18/2006 304 670 4
NA 302 12/18/2005 340 670 4.3
NA 302 1/26/2004 340 670 4

How do I embedd something in it to pull the row with the latest date--
or in this example-- the one with the 2/14/06 date?

Help?

Thanks!
knox5731