Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 313
Default Form return lookup values

I have a table that has three start dates. I need use an employees start
date as a reference point compare it to todays date and find the next date
in the column and return it to a textbox in a form. Then I need to return the
next four dates in the column to the form.

Dec 22, 2008 Dec 26, 2008 Dec 29, 2008
Jan 12, 2009 Jan 16, 2009 Jan 19, 2009
Feb 02, 2009 Feb 06, 2009 Feb 09, 2009
Feb 23, 2009 Feb 27, 2009 Mar 02, 2009
Mar 16, 2009 Mar 20, 2009 Mar 23, 2009
Apr 06, 2009 Apr 10, 2009 Apr 13, 2009
Apr 27, 2009 May 01, 2009 May 04, 2009
May 18, 2009 May 22, 2009 May 25, 2009
Jun 08, 2009 Jun 12, 2009 Jun 15, 2009
Jun 29, 2009 Jul 03, 2009 Jul 06, 2009

So if the start date is Dec 26, 2008 and today€˜s date is Feb 18, 2009, the
return date should be Feb 27, 2009. I have code that brings in the start date
but need help with code to find the next date after todays date and the next
four values.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Form return lookup values

Is this array forula what you want?

=INDEX(A1:C10,MATCH(TODAY(),INDEX(A1:C10,0,MIN(IF( A1:C1=startdate,COLUMN(A1:C1)))),1)+1,MATCH(startd ate,A1:C1,0))

--
__________________________________
HTH

Bob

"Tony" wrote in message
...
I have a table that has three start dates. I need use an employee's start
date as a reference point compare it to today's date and find the next
date
in the column and return it to a textbox in a form. Then I need to return
the
next four dates in the column to the form.

Dec 22, 2008 Dec 26, 2008 Dec 29, 2008
Jan 12, 2009 Jan 16, 2009 Jan 19, 2009
Feb 02, 2009 Feb 06, 2009 Feb 09, 2009
Feb 23, 2009 Feb 27, 2009 Mar 02, 2009
Mar 16, 2009 Mar 20, 2009 Mar 23, 2009
Apr 06, 2009 Apr 10, 2009 Apr 13, 2009
Apr 27, 2009 May 01, 2009 May 04, 2009
May 18, 2009 May 22, 2009 May 25, 2009
Jun 08, 2009 Jun 12, 2009 Jun 15, 2009
Jun 29, 2009 Jul 03, 2009 Jul 06, 2009

So if the start date is Dec 26, 2008 and today's date is Feb 18, 2009, the
return date should be Feb 27, 2009. I have code that brings in the start
date
but need help with code to find the next date after today's date and the
next
four values.




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
Lookup 2 values to return 1 Sarah Excel Worksheet Functions 9 March 23rd 10 04:05 PM
Lookup 2 values and return a third Sh Excel Worksheet Functions 1 May 4th 09 09:09 PM
User form return values Suhas Excel Programming 0 August 25th 07 08:18 PM
How do I use LOOKUP to return a range of values, then SUM values? irvine79 Excel Worksheet Functions 5 August 4th 06 01:33 PM
How do I lookup and return different values when the lookup value. kg Excel Discussion (Misc queries) 1 January 20th 05 12:53 AM


All times are GMT +1. The time now is 05:26 PM.

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"