Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lookup Formula
In Excel2000, I have the following data:
Weekending Fiscal Month 2/19/2005 FEB 2/26/2005 FEB 3/5/2005 MAR 3/12/2005 MAR I want to have a lookup formula that looks up all dates before the weekending date. For example for the following: 2/25/2005 = Feb 2/26/2005 = Feb 2/27/2005 = Mar 2/28/2005 = Mar 2/29/2005 = Mar 3/1/2005= Mar Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lookup Formula
"snax500" wrote:
I want to have a lookup formula that looks up all dates before the weekending date. I'm not sure what it is you're after: do you want to be told the week ending date for a given date, or do you want a list of all the dates for the week that ends on a given date? If you really want a lookup, what's it supposed to do? In the first case, Public Function WeekendingDate(day As Date) As Date 'could use some parameter checking... day < 0, etc. Dim daynumber As Integer daynumber = Weekday(day) WeekendingDate = day + 7 - daynumber End Function In the second case, just use date arithmetic: day - 1, day - 2, etc. Or were you after something else? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Utilizing a RANDBETWEEN() formula within a LOOKUP formula | Excel Discussion (Misc queries) | |||
need help with lookup formula | Excel Worksheet Functions | |||
Lookup and Use a Formula | Excel Discussion (Misc queries) | |||
Lookup formula | Excel Worksheet Functions | |||
Lookup Formula - but have a formula if it can't find/match a value | Excel Worksheet Functions |