A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

vlookup(date, range,3)



 
 
Thread Tools Display Modes
  #1  
Old March 16th, 2010, 05:12 PM posted to microsoft.public.excel.worksheet.functions
David
external usenet poster
 
Posts: 1,494
Default vlookup(date, range,3)

Hello Group,

I am doing a vlookup on a date, I will take the closest date, so have not
used the last parameter. It returns the last date in the list always. Both
the date in the Lookup and in the table are type = 1, a number.

Am I missing something here or is it not possible to do this?

Thanks,
David
  #2  
Old March 16th, 2010, 05:27 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default vlookup(date, range,3)

I will take the closest date, so have not used the last parameter.
vlookup(date, range,3)
It returns the last date in the list always.


When you omit the range_lookup argument the table_array *must* be sorted by
the date in ascending order. The "closest" date will be the closest date
that is less than or equal to the lookup date. For example:

1/1/2010...10
1/5/2010...25
1/8/2010...42

If your lookup date was 1/7/2010 the formula would "match" 1/5/2010 and the
result would be 25.

1/5/2010 is the closest date that is *less than or equal to* the lookup date
1/7/2010.

Is that what you had in mind?

--
Biff
Microsoft Excel MVP


"David" wrote in message
...
Hello Group,

I am doing a vlookup on a date, I will take the closest date, so have not
used the last parameter. It returns the last date in the list always. Both
the date in the Lookup and in the table are type = 1, a number.

Am I missing something here or is it not possible to do this?

Thanks,
David



  #3  
Old March 16th, 2010, 06:46 PM posted to microsoft.public.excel.worksheet.functions
David
external usenet poster
 
Posts: 1,494
Default vlookup(date, range,3)

Thanks. I changed it to "false" and it worked.

"T. Valko" wrote:

I will take the closest date, so have not used the last parameter.
vlookup(date, range,3)
It returns the last date in the list always.


When you omit the range_lookup argument the table_array *must* be sorted by
the date in ascending order. The "closest" date will be the closest date
that is less than or equal to the lookup date. For example:

1/1/2010...10
1/5/2010...25
1/8/2010...42

If your lookup date was 1/7/2010 the formula would "match" 1/5/2010 and the
result would be 25.

1/5/2010 is the closest date that is *less than or equal to* the lookup date
1/7/2010.

Is that what you had in mind?

--
Biff
Microsoft Excel MVP


"David" wrote in message
...
Hello Group,

I am doing a vlookup on a date, I will take the closest date, so have not
used the last parameter. It returns the last date in the list always. Both
the date in the Lookup and in the table are type = 1, a number.

Am I missing something here or is it not possible to do this?

Thanks,
David



.

  #4  
Old March 16th, 2010, 09:06 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default vlookup(date, range,3)

Good deal. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"David" wrote in message
...
Thanks. I changed it to "false" and it worked.

"T. Valko" wrote:

I will take the closest date, so have not used the last parameter.
vlookup(date, range,3)
It returns the last date in the list always.


When you omit the range_lookup argument the table_array *must* be sorted
by
the date in ascending order. The "closest" date will be the closest date
that is less than or equal to the lookup date. For example:

1/1/2010...10
1/5/2010...25
1/8/2010...42

If your lookup date was 1/7/2010 the formula would "match" 1/5/2010 and
the
result would be 25.

1/5/2010 is the closest date that is *less than or equal to* the lookup
date
1/7/2010.

Is that what you had in mind?

--
Biff
Microsoft Excel MVP


"David" wrote in message
...
Hello Group,

I am doing a vlookup on a date, I will take the closest date, so have
not
used the last parameter. It returns the last date in the list always.
Both
the date in the Lookup and in the table are type = 1, a number.

Am I missing something here or is it not possible to do this?

Thanks,
David



.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:25 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.