+ Reply to Thread
Results 1 to 5 of 5

Attempts to track partial years of employment; intriguing formulas, further expansion

  1. #1
    Registered User
    Join Date
    07-28-2013
    Location
    Eastern Seaboard, North America
    MS-Off Ver
    Excel 2010
    Posts
    38

    Attempts to track partial years of employment; intriguing formulas, further expansion

    One sometimes has to keep track of when and how much a person works during a fiscal year. One prefers to keep track of fractional periods of fiscal years.

    http://www.excel-easy.com/examples/day-of-the-year.html

    http://excelsemipro.com/2011/01/what...he-year-is-it/

    http://www.mrexcel.com/archive/Formulas/7749.html

    http://www.excelforum.com/excel-form...r-of-year.html

    Perhaps somewhat curiously, Excel lacks a function to return the number of a day in the year. For example, January 1 (1/1) serves as Day 1 of a calendar year, January 31 (1/31) serves as Day 31 of a calendar year. Leap years complicate this situation minimally, adding just an extra day. An Excel formula follows:

    = A2-DATE(YEAR(A2),1,0)

    =(A1-DATE(YEAR(A1),1,0))/(365+ISNUMBER(("2/29/"&YEAR(A1))+0))

    =A1-DATE(YEAR(A1), 1, 0)

    Sometimes fiscal years present somewhat complicated calculations. September 30 (9/30) usually occurs as roughly the two hundred seventieth (270th) day of the year. A fiscal year commences accordingly on October 1 (10/1).

    Some key terms:

    DY=Day of Year

    DOH=Date of Hire

    DOT=Date of Termination

    So, if a person commences work after October 1 (10/1), one proceeds accordingly:

    (365-DYDOH+270)/365

    If a person commences work prior to October 1 (10/1), one proceeds as follows:

    (270-DYDOH)/365

    If the DOT occurs prior to October 1 (10/1), then one resorts to the following:

    (270-DYDOT+270)/365

    If the DOT occurs after October 1 (10/1), then one resorts to the following:

    (DYDOT-270)/365

    Date functions in Excel allow one to quite easily identify when 10/1 occurs in a particular calendar year. This helps attend to the complications of leap years. One uses DATE(year,month,day) with month and day set as October 1 (10/1); one could name a cell to contain October 1 of any year (10/1) as a set reference point. For the year, the formulas above indicate that one may have to use a prior year or a subsequent year, so one should use the Year function with one (1) added or subtracted as appropriate.
    _________________________________________________________________________________________________

    Some approaches or complications that occurred to me:

    1. Can anyone think of a somewhat simple formula that quantifies the number of whole years occurring amongst a person's DOH and DOT?

    2. I have the notion of setting up perhaps a separate sheet in the workbook or Excel file that would using information flowing from another worksheet. One would enter the data on an individual, for example, Margo L---, with DOT, DOH, etc. This information would flow to a separate sheet. This separate sheet would then take that information and prepare in columns the following:

    One column would feature the first day of the fiscal year in which the person commenced employment, and the adjacent column would feature the end of this respective fiscal year. A third column would feature the fraction value of the part of the fiscal year that the person worked (so if the person worked 3/4 of the fiscal year, .75). This would continue until the DOT, with in that column (though in obviously a different row) the first day of the fiscal year containing the DOT and in the adjacent column, the last day of the fiscal year containing the DOT. A third column would contain the fractional part of the fiscal year that the person worked in the fiscal year containing the DOT (so if the person worked 3/4 of the fiscal year, .75).

    One could also have in further columns the respective commencement dates of subsequent fiscal years and respective end dates of subsequent fiscal years. This could continue for many subsequent years, with perhaps these subsequent rows serving as areas to insert data should the person ever return to work with the same employer.
    Last edited by PivotTablePSHomage; 01-29-2016 at 11:50 PM. Reason: some clarity

  2. #2
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Attempts to track partial years of employment; intriguing formulas, further expansion

    Difference of two dates in years
    =datedif(doh,dot,"y")

    For the remaining days

    =DATEDIF(doh,dot,"d")-DATEDIF(doh,dot,"Y")*365

    For the percentage of a year remaining

    =(DATEDIF(doh,dot,"d")-DATEDIF(doh,dot,"Y")*365)/365
    Last edited by Neil_; 01-30-2016 at 03:29 AM.
    Frob first, tweak later

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Attempts to track partial years of employment; intriguing formulas, further expansion

    Hi,

    See if this site helps with your problem:

    http://www.excel-2010.com/excel-datedif/
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    07-28-2013
    Location
    Eastern Seaboard, North America
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Attempts to track partial years of employment; intriguing formulas, further expansion

    Quote Originally Posted by Neil_ View Post
    Difference of two dates in years
    =datedif(doh,dot,"y")

    For the remaining days

    =DATEDIF(doh,dot,"d")-DATEDIF(doh,dot,"Y")*365

    For the percentage of a year remaining

    =(DATEDIF(doh,dot,"d")-DATEDIF(doh,dot,"Y")*365)/365
    I appreciate the help and response. I will note that some of the challenge entailed the situation with fiscal years. Fiscal years present the complications that I identified. The DATEDIF formula presumes a year of duration of a calendar year, commencing on January 1 (1/1) to December 31 (12/31). As I have shown, in a fiscal year, one must carefully determine what portion of the current or contemporaneous calendar year and what portion of the subsequent calendar year one must include, except of course in the situation where someone's employment severs after a fiscal year has commenced, where one only includes the part of the contemporaneous calendar year following the end of the previous fiscal year.

    One has to resort to the elaborate formulas and calculations that I constructed to accommodate this situation. I anticipate that one would require elaborate programming to operationally redefine a year from a conventional calendar year of January 1 to December 1 (1/1 to 12/31) to bypass or resolve this situation. The DATEDIF function could serve as quite helpful for the future.

    Aside from this, or perhaps as an adjunct to this situation, can anyone think of a way to easily return the number of whole years occurring amongst two dates? One would operationally define a year here to mean 365 days or perhaps 365.25 days to more approximately reflect solar years.

  5. #5
    Registered User
    Join Date
    07-28-2013
    Location
    Eastern Seaboard, North America
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Attempts to track partial years of employment; intriguing formulas, further expansion

    Checking over the Intervals, should I take this to mean that by itself, one can only use the function for dates within the same year, or does the formula adjust accordingly (i.e. does the formula effectively automatically adjust for fiscal years)?

    Interval

    Use

    m Months: the number of whole calendar months between the two dates
    d Days: the number of days between the dates
    y Years: the number of whole calendar years between the dates
    ym Months In Same Year: the number of months between the two dates if they were in the same year
    yd Days In Same Year: the number of days between the two dates if they were in the same year
    md Days In Same Month And Year: the number of days between the two dates if they were in the same month and year

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Expansion on match index formulas
    By jarredwyatt in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-25-2015, 06:48 AM
  2. I can't figure out how to track years
    By shawnjohn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2014, 06:15 PM
  3. [SOLVED] Need Formulas to Hide Partial Concatenate Data and Help Determining Two Other Formulas
    By Mattdim805 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-13-2013, 04:11 PM
  4. Replies: 3
    Last Post: 10-08-2013, 10:26 AM
  5. Replies: 0
    Last Post: 10-07-2013, 05:59 PM
  6. Employment Years of Service for future date formula
    By cgharib in forum Excel General
    Replies: 4
    Last Post: 01-13-2012, 08:25 PM
  7. track sales history by month for several years
    By Kyle in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 07-07-2005, 02:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1