Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Find Specific date in Biwwekly Based on date

I am trying to find the next biweekly end date based on todays date.
The biweeklies end on Saturdays and that is the date I need to
return. 1-24-09, 1-10-09, 12-27-08. These are some of the dates.

Is there a way to do this with functions in excel or is this going to
have to be a UDF?

Thanks in advance,
Jay
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Find Specific date in Biwwekly Based on date

Try this

=IF(MOD(WEEKNUM(A1),2)=1,A1+CHOOSE(WEEKDAY(A1),13, 12,11,10,9,8,7),A1+CHOOSE(WEEKDAY(A1),6,5,4,3,2,1, 0))

Mike

"jlclyde" wrote:

I am trying to find the next biweekly end date based on todays date.
The biweeklies end on Saturdays and that is the date I need to
return. 1-24-09, 1-10-09, 12-27-08. These are some of the dates.

Is there a way to do this with functions in excel or is this going to
have to be a UDF?

Thanks in advance,
Jay

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Find Specific date in Biwwekly Based on date

Put a date in F2 and in G2 use
=F2+IF(WEEKDAY(F2)=7,14,7)-WEEKDAY(F2)+(MOD(F2+IF(WEEKDAY(F2)=7,14,7)-WEEKDAY(F2)-DATE(2008,12,27),14)<0)*7

Now the first part of this =F2+IF(WEEKDAY(F2)=7,14,7)-WEEKDAY(F2) finds the
date of the next Saturday
The second part
+(MOD(F2+IF(WEEKDAY(F2)=7,14,7)-WEEKDAY(F2)-DATE(2008,12,27),14)<0)*7 adds
7 if the next Saturday date is not an even number of 14 days away from
27/Dec/2008

Test this with various dates in F2; it works for me
Now replace F2 by TODAY()
=TODAY()+IF(WEEKDAY(TODAY())=7,14,7)-WEEKDAY(TODAY())+(MOD(TODAY()+IF(WEEKDAY(TODAY())= 7,14,7)-WEEKDAY(TODAY())-DATE(2008,12,27),14)<0)*7
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"jlclyde" wrote in message
...
I am trying to find the next biweekly end date based on todays date.
The biweeklies end on Saturdays and that is the date I need to
return. 1-24-09, 1-10-09, 12-27-08. These are some of the dates.

Is there a way to do this with functions in excel or is this going to
have to be a UDF?

Thanks in advance,
Jay



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Find Specific date in Biwwekly Based on date

Both work great. Thank you for the ideas. I always seem to forget
about MOD.
Jay
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
business day date from a specific date based on a number of days Jana Excel Worksheet Functions 2 January 2nd 08 06:21 PM
Find specific date for day in week The Rook[_2_] Excel Discussion (Misc queries) 4 July 30th 07 09:52 AM
Formula to subtract a $ value based on specific date pj_czar Excel Worksheet Functions 3 July 9th 07 03:36 PM
How do I set up alarms based on days from a specific date? CD&T Excel Worksheet Functions 0 February 20th 07 07:49 PM
adding specific cells based on a corresponding date bluemoir Excel Worksheet Functions 0 February 9th 06 05:55 PM


All times are GMT +1. The time now is 07:31 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"