Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Bi-weekly date dilema

I am trying to find a way to have excel recognize a bi-weekly pay period for
a timesheet I am working on, but I have run into a problem. I can easily
have excel count off every other Monday for a few weeks, but how do I tell it
where to start? Our pay periods always change depending on the year. So the
first Monday in September is a pay-day this year, but next year it might fall
on the second Monday in September.

Is there a way to give an example of a 'good' Monday and have excel handle
whether or not it is an increment of 14?

Thanks,
Jeff
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Bi-weekly date dilema

Is the very first Monday of the year a payday or not??
--
Gary''s Student


"Spongebob" wrote:

I am trying to find a way to have excel recognize a bi-weekly pay period for
a timesheet I am working on, but I have run into a problem. I can easily
have excel count off every other Monday for a few weeks, but how do I tell it
where to start? Our pay periods always change depending on the year. So the
first Monday in September is a pay-day this year, but next year it might fall
on the second Monday in September.

Is there a way to give an example of a 'good' Monday and have excel handle
whether or not it is an increment of 14?

Thanks,
Jeff

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Bi-weekly date dilema

Sometimes. We do not reset our payroll at the beginning/end of the year if
that is what you are asking. It always continues. The odd number of days in
a year makes this difficult for me to predict. I am certainly not a math
wizard and therefore I am having difficulty working out a formula to do so.

"Gary''s Student" wrote:

Is the very first Monday of the year a payday or not??
--
Gary''s Student


"Spongebob" wrote:

I am trying to find a way to have excel recognize a bi-weekly pay period for
a timesheet I am working on, but I have run into a problem. I can easily
have excel count off every other Monday for a few weeks, but how do I tell it
where to start? Our pay periods always change depending on the year. So the
first Monday in September is a pay-day this year, but next year it might fall
on the second Monday in September.

Is there a way to give an example of a 'good' Monday and have excel handle
whether or not it is an increment of 14?

Thanks,
Jeff

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 527
Default Bi-weekly date dilema



"Spongebob" wrote:

I am trying to find a way to have excel recognize a bi-weekly pay period for
a timesheet I am working on, but I have run into a problem. I can easily
have excel count off every other Monday for a few weeks, but how do I tell it
where to start? Our pay periods always change depending on the year. So the
first Monday in September is a pay-day this year, but next year it might fall
on the second Monday in September.

Is there a way to give an example of a 'good' Monday and have excel handle
whether or not it is an increment of 14?

Thanks,
Jeff


Jeff

Here's the way I did it. Create a Table

First Monday in September
Year Date(a4,9,1) Weekday(A4) Diff Formula
2007 01/09/2007 7 2 03/09/2007
2008 01/09/2008 2 0 01/09/2008
2009 01/09/2009 3 6 07/09/2009
2010 01/09/2010 4 5 06/09/2010
2011 01/09/2011 5 4 05/09/2011
2012 01/09/2012 7 2 03/09/2012
2013 01/09/2013 1 1 02/09/2013
2014 01/09/2014 2 0 01/09/2014

Year is in A4 down.
B4: =DATE(A4,9,1)
C4: =WEEKDAY(DATE(A4,9,1))
E4:
=IF(WEEKDAY(B4)<2,B4+1,IF(WEEKDAY(B4)=2,B4,IF(WEEK DAY(B4)2,B4+7-(WEEKDAY(B4)-2))))

We can now substitute the dates in the formula for Date and now functions.

=IF(WEEKDAY(date(year(today()),9,1))<2,date(year(t oday()),9,1))+1,IF(WEEKDAY(date(year(today()),9,1) )=2,today(),IF(WEEKDAY(date(year(today()),9,1))2, date(year(Today()),9,1)+7-(WEEKDAY(date(year(Today()),9,1))-2)))

I made a mistake here but I have to go to bed, maybe look at it again in the
morning.
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 527
Default Bi-weekly date dilema

This formula will give you the first Monday Payday of the year closest to 1st
sept.

=IF(WEEKDAY(DATE(YEAR(TODAY()),9,1))2,(DATE(YEAR( TODAY()),9,1))+7-(WEEKDAY(DATE(YEAR(TODAY()),9,1)))-2,IF(WEEKDAY(DATE(YEAR(TODAY()),9,1))=2,DATE(YEAR( TODAY()),9,1),F(WEEKDAY(DATE(YEAR(TODAY()),9,1))<2 ,DATE(YEAR(TODAY()),9,1)+1)))

You can use this to calculate the Bi weekly dates.

Be careful with the wrapping. Paste to Notepad if necessary and copy from
there into Excel.

regards
Peter Atherton

"Billy Liddel" wrote:



"Spongebob" wrote:

I am trying to find a way to have excel recognize a bi-weekly pay period for
a timesheet I am working on, but I have run into a problem. I can easily
have excel count off every other Monday for a few weeks, but how do I tell it
where to start? Our pay periods always change depending on the year. So the
first Monday in September is a pay-day this year, but next year it might fall
on the second Monday in September.

Is there a way to give an example of a 'good' Monday and have excel handle
whether or not it is an increment of 14?

Thanks,
Jeff


Jeff

Here's the way I did it. Create a Table

First Monday in September
Year Date(a4,9,1) Weekday(A4) Diff Formula
2007 01/09/2007 7 2 03/09/2007
2008 01/09/2008 2 0 01/09/2008
2009 01/09/2009 3 6 07/09/2009
2010 01/09/2010 4 5 06/09/2010
2011 01/09/2011 5 4 05/09/2011
2012 01/09/2012 7 2 03/09/2012
2013 01/09/2013 1 1 02/09/2013
2014 01/09/2014 2 0 01/09/2014

Year is in A4 down.
B4: =DATE(A4,9,1)
C4: =WEEKDAY(DATE(A4,9,1))
E4:
=IF(WEEKDAY(B4)<2,B4+1,IF(WEEKDAY(B4)=2,B4,IF(WEEK DAY(B4)2,B4+7-(WEEKDAY(B4)-2))))

We can now substitute the dates in the formula for Date and now functions.

=IF(WEEKDAY(date(year(today()),9,1))<2,date(year(t oday()),9,1))+1,IF(WEEKDAY(date(year(today()),9,1) )=2,today(),IF(WEEKDAY(date(year(today()),9,1))2, date(year(Today()),9,1)+7-(WEEKDAY(date(year(Today()),9,1))-2)))

I made a mistake here but I have to go to bed, maybe look at it again in the
morning.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Bi-weekly date dilema

Wow, that was quite a response. It took me a while to even understand what
you did, however I now see it. While you have introduced me to the
usefullness of several more date formulas it still does not accomplish my
goal.

It appears that your formula will find the first Monday of September, but it
still does not tell me if that date is the beginning of our pay-period or not.

Maybe I am approaching this wrong. In Excel dates are represented as a
serial number. Maybe I just need a formula which will look at a date and see
if it is a multiple of 14 from a date which I already know is the beginning
of a pay-period. Is there a formula which does this?


"Billy Liddel" wrote:

This formula will give you the first Monday Payday of the year closest to 1st
sept.

=IF(WEEKDAY(DATE(YEAR(TODAY()),9,1))2,(DATE(YEAR( TODAY()),9,1))+7-(WEEKDAY(DATE(YEAR(TODAY()),9,1)))-2,IF(WEEKDAY(DATE(YEAR(TODAY()),9,1))=2,DATE(YEAR( TODAY()),9,1),F(WEEKDAY(DATE(YEAR(TODAY()),9,1))<2 ,DATE(YEAR(TODAY()),9,1)+1)))

You can use this to calculate the Bi weekly dates.

Be careful with the wrapping. Paste to Notepad if necessary and copy from
there into Excel.

regards
Peter Atherton

"Billy Liddel" wrote:



"Spongebob" wrote:

I am trying to find a way to have excel recognize a bi-weekly pay period for
a timesheet I am working on, but I have run into a problem. I can easily
have excel count off every other Monday for a few weeks, but how do I tell it
where to start? Our pay periods always change depending on the year. So the
first Monday in September is a pay-day this year, but next year it might fall
on the second Monday in September.

Is there a way to give an example of a 'good' Monday and have excel handle
whether or not it is an increment of 14?

Thanks,
Jeff


Jeff

Here's the way I did it. Create a Table

First Monday in September
Year Date(a4,9,1) Weekday(A4) Diff Formula
2007 01/09/2007 7 2 03/09/2007
2008 01/09/2008 2 0 01/09/2008
2009 01/09/2009 3 6 07/09/2009
2010 01/09/2010 4 5 06/09/2010
2011 01/09/2011 5 4 05/09/2011
2012 01/09/2012 7 2 03/09/2012
2013 01/09/2013 1 1 02/09/2013
2014 01/09/2014 2 0 01/09/2014

Year is in A4 down.
B4: =DATE(A4,9,1)
C4: =WEEKDAY(DATE(A4,9,1))
E4:
=IF(WEEKDAY(B4)<2,B4+1,IF(WEEKDAY(B4)=2,B4,IF(WEEK DAY(B4)2,B4+7-(WEEKDAY(B4)-2))))

We can now substitute the dates in the formula for Date and now functions.

=IF(WEEKDAY(date(year(today()),9,1))<2,date(year(t oday()),9,1))+1,IF(WEEKDAY(date(year(today()),9,1) )=2,today(),IF(WEEKDAY(date(year(today()),9,1))2, date(year(Today()),9,1)+7-(WEEKDAY(date(year(Today()),9,1))-2)))

I made a mistake here but I have to go to bed, maybe look at it again in the
morning.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 360
Default Bi-weekly date dilema

Maybe I just need a formula which will look at a date and see
if it is a multiple of 14 from a date which I already know is the beginning
of a pay-period. *Is there a formula which does this?


With the dates in column A and your "good" beginning date in a1:

IF(INT((A2-$A$1)/14)-(A2-$A$1)/14=0,"Beginning of a Pay Period","Not a
Beginning of a Pay Period")

Cliff Edwards
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Bi-weekly date dilema

Awesome, that did it. Thank you.

As far as I can tell it also works beyond leap-year. Is that a correct
determination?


"ward376" wrote:

Maybe I just need a formula which will look at a date and see
if it is a multiple of 14 from a date which I already know is the beginning
of a pay-period. Is there a formula which does this?


With the dates in column A and your "good" beginning date in a1:

IF(INT((A2-$A$1)/14)-(A2-$A$1)/14=0,"Beginning of a Pay Period","Not a
Beginning of a Pay Period")

Cliff Edwards

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
excel dilema sam23 Excel Discussion (Misc queries) 3 July 12th 07 09:20 AM
IF Dilema detail Shu of AZ Excel Discussion (Misc queries) 6 December 26th 06 05:08 AM
IF Dilema Shu of AZ Excel Discussion (Misc queries) 10 December 24th 06 06:15 PM
Date Range -- Weekly Brad Payne Excel Worksheet Functions 2 October 20th 05 11:00 AM
sorting dilema Bobbie Excel Discussion (Misc queries) 3 January 5th 05 06:01 PM


All times are GMT +1. The time now is 09:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"