Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default Looking up a date

Trying to get this to work, but no success:
=LOOKUP(A6,{DATEVALUE("3/26/2010"),DATEVALUE("6/24/2010"),DATEVALUE("9/22/2010")},{"3","2","1"})

The value in A6 is a function; not hard-coded.

It seems to work with one date and one result vector, but not two, and
ultimately I will need several, maybe 7 or 8.

Any ideas?

Thanks!
Ryan--
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Looking up a date

You can't use functions in array constants.

ultimately I will need several, maybe 7 or 8.


Why don't you just create a table in ascending order by date:

.............A.........B
1...3/26/2010...3
2...6/24/2010...2
3...9/22/2010...1


A6 = some date

=LOOKUP(A6,A1:B3)

--
Biff
Microsoft Excel MVP


"RyGuy" wrote in message
...
Trying to get this to work, but no success:
=LOOKUP(A6,{DATEVALUE("3/26/2010"),DATEVALUE("6/24/2010"),DATEVALUE("9/22/2010")},{"3","2","1"})

The value in A6 is a function; not hard-coded.

It seems to work with one date and one result vector, but not two, and
ultimately I will need several, maybe 7 or 8.

Any ideas?

Thanks!
Ryan--



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default Looking up a date

I could do that, but I have MANY different dates, no logical pattern (except
in this example, which is date + 90 days). I actually thought it would be
easier to hard-code these. Usually I don't do this, but this time it just
seems like it is easier to do it this way. What do you think?


"T. Valko" wrote:

You can't use functions in array constants.

ultimately I will need several, maybe 7 or 8.


Why don't you just create a table in ascending order by date:

.............A.........B
1...3/26/2010...3
2...6/24/2010...2
3...9/22/2010...1


A6 = some date

=LOOKUP(A6,A1:B3)

--
Biff
Microsoft Excel MVP


"RyGuy" wrote in message
...
Trying to get this to work, but no success:
=LOOKUP(A6,{DATEVALUE("3/26/2010"),DATEVALUE("6/24/2010"),DATEVALUE("9/22/2010")},{"3","2","1"})

The value in A6 is a function; not hard-coded.

It seems to work with one date and one result vector, but not two, and
ultimately I will need several, maybe 7 or 8.

Any ideas?

Thanks!
Ryan--



.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Looking up a date

What do you think?

I'd use a table. I'm not a big fan of hardcoding.

--
Biff
Microsoft Excel MVP


"RyGuy" wrote in message
...
I could do that, but I have MANY different dates, no logical pattern
(except
in this example, which is date + 90 days). I actually thought it would be
easier to hard-code these. Usually I don't do this, but this time it just
seems like it is easier to do it this way. What do you think?


"T. Valko" wrote:

You can't use functions in array constants.

ultimately I will need several, maybe 7 or 8.


Why don't you just create a table in ascending order by date:

.............A.........B
1...3/26/2010...3
2...6/24/2010...2
3...9/22/2010...1


A6 = some date

=LOOKUP(A6,A1:B3)

--
Biff
Microsoft Excel MVP


"RyGuy" wrote in message
...
Trying to get this to work, but no success:
=LOOKUP(A6,{DATEVALUE("3/26/2010"),DATEVALUE("6/24/2010"),DATEVALUE("9/22/2010")},{"3","2","1"})

The value in A6 is a function; not hard-coded.

It seems to work with one date and one result vector, but not two, and
ultimately I will need several, maybe 7 or 8.

Any ideas?

Thanks!
Ryan--



.



Reply
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
Concatenate including a date so that the date appears as a date Zembu Excel Worksheet Functions 2 January 6th 10 06:09 PM
date in Cell to change colors if the date is beyond today's date Pete Elbert Excel Discussion (Misc queries) 2 June 6th 09 06:31 AM
Making a date go red, if date passes todays date. Jamie Excel Worksheet Functions 2 September 9th 08 02:14 PM
Report Date - Date Recv = Days Late, but how to rid completed date MS Questionnairess Excel Worksheet Functions 1 January 24th 07 11:05 PM
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM


All times are GMT +1. The time now is 08:46 AM.

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

About Us

"It's about Microsoft Excel"