Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Concatenate including a date so that the date appears as a date | Excel Worksheet Functions | |||
date in Cell to change colors if the date is beyond today's date | Excel Discussion (Misc queries) | |||
Making a date go red, if date passes todays date. | Excel Worksheet Functions | |||
Report Date - Date Recv = Days Late, but how to rid completed date | Excel Worksheet Functions | |||
Date updates from worksheet to chart & changes date to a date series! Help!! | Charts and Charting in Excel |