Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Date VBA Lookup

I am trying to use Vlookup as intended by excel and find the closest
match to today. In K coloumn I have dates that are sorted ascending.
In M I have the value I woudl liek to return. Neither of these work.
Any help woudl be appreciated. Code Below.

Thanks,
Jay

Set Fn = Application.WorksheetFunction
Qty = Fn.VLookup(DateSerial(Year(Date), Month(Date), Day(Date)), Range
("K2:M7"), 3)
Qty = Fn.VLookup(Date, Range("K2:M7"), 3)
 
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
Date LookUp Jordan Excel Worksheet Functions 3 October 3rd 08 12:27 AM
Date Lookup drumbumuk Excel Discussion (Misc queries) 1 August 8th 08 10:25 AM
Lookup MIN Date Bob Phillips[_3_] Excel Worksheet Functions 0 August 1st 08 05:56 PM
Lookup MIN Date dcr Excel Worksheet Functions 6 August 1st 08 05:55 PM
Lookup MIN Date Pete_UK Excel Worksheet Functions 0 July 25th 08 08:10 PM


All times are GMT +1. The time now is 05:40 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"