Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() "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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel dilema | Excel Discussion (Misc queries) | |||
IF Dilema detail | Excel Discussion (Misc queries) | |||
IF Dilema | Excel Discussion (Misc queries) | |||
Date Range -- Weekly | Excel Worksheet Functions | |||
sorting dilema | Excel Discussion (Misc queries) |