PC Review


Reply
Thread Tools Rate Thread

calculating a date using the day of the week as a starting point?

 
 
=?Utf-8?B?U2ltb24=?=
Guest
Posts: n/a
 
      12th Jul 2006
I need to calculate the start date of a service based on the day of the week,
i.e. Monday, Tuesday, etc.

For example:
All of our clients are paid weekly. Their paydays vary between Monday and
Thursday. Lets say client "A" starts a service on a Wednesday (12 July
2006), but he/she is paid on a Monday, we would take the start date of their
service as the following Monday (17 July 2006). In other words, we can only
pay clients weekly, starting from their very next payday.

I need to enter a formula to work out the 17th July in the example above.
 
Reply With Quote
 
 
 
 
John Michl
Guest
Posts: n/a
 
      12th Jul 2006
There is probably a more elegant method but the following if statement
works.
A2 = the weekday of the pay period where 1 = Sunday, 2 = Monday, etc.
(must be a number)
B2 = the first day of actual work
C2
=IF(A2=WEEKDAY(B2),B2,IF(A2>WEEKDAY(B2),B2+A2-WEEKDAY(B2),B2+A2-WEEKDAY(B2)+7))

- John


Simon wrote:
> I need to calculate the start date of a service based on the day of the week,
> i.e. Monday, Tuesday, etc.
>
> For example:
> All of our clients are paid weekly. Their paydays vary between Monday and
> Thursday. Lets say client "A" starts a service on a Wednesday (12 July
> 2006), but he/she is paid on a Monday, we would take the start date of their
> service as the following Monday (17 July 2006). In other words, we can only
> pay clients weekly, starting from their very next payday.
>
> I need to enter a formula to work out the 17th July in the example above.


 
Reply With Quote
 
Ardus Petus
Guest
Posts: n/a
 
      12th Jul 2006
Hi Simon,

For Monday:
=$A1+MOD(9-WEEKDAY($A1),7)
For Tuesday:
=$A1+MOD(10-WEEKDAY($A1),7)
etc...

HTH
--
AP

"Simon" <(E-Mail Removed)> a écrit dans le message de news:
26957DD5-0AE9-4701-9593-(E-Mail Removed)...
>I need to calculate the start date of a service based on the day of the
>week,
> i.e. Monday, Tuesday, etc.
>
> For example:
> All of our clients are paid weekly. Their paydays vary between Monday and
> Thursday. Lets say client "A" starts a service on a Wednesday (12 July
> 2006), but he/she is paid on a Monday, we would take the start date of
> their
> service as the following Monday (17 July 2006). In other words, we can
> only
> pay clients weekly, starting from their very next payday.
>
> I need to enter a formula to work out the 17th July in the example above.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating Week of date ExcelUser09 Microsoft Excel Discussion 2 24th Mar 2009 10:41 PM
Calculating End-of-Week Date dcornett63 Microsoft Access 3 19th Feb 2009 05:52 PM
Re: Calculating a week ending date Scott Lichtenberg Microsoft Access Queries 1 14th Nov 2008 04:53 PM
RE: Calculating a week ending date KARL DEWEY Microsoft Access Queries 0 14th Nov 2008 03:42 PM
Calculating week end date - always a Monday =?Utf-8?B?T3B0b215c3Q=?= Microsoft Access Forms 2 2nd Jun 2005 06:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:48 AM.