+ Reply to Thread
Results 1 to 18 of 18

Absence Periods Calculation

  1. #1
    Registered User
    Join Date
    05-21-2014
    Posts
    11

    Absence Periods Calculation

    Can you help, I have attached an absence sheet which shows each employee number and each period of absence - start and end date.

    I need a formulae which will show how many periods of absence each employee has had bearing in mind all employees are on the same sheet. For example, staff no 88 should show as 2 periods of absence as the first four absences are linked, the formulae should then move on to the next staff no and count again

    Hope this makes sense

    Any help is appreciated
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Absence Periods Calculation

    what does the start and end date signify?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    05-21-2014
    Posts
    11

    Re: Absence Periods Calculation

    Quote Originally Posted by Sambo kid View Post
    what does the start and end date signify?
    Hi, it is the start and end of each absence period. Its just the way our system records information

    Thanks

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Absence Periods Calculation

    does this work for you?
    Attached Files Attached Files
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  5. #5
    Registered User
    Join Date
    05-21-2014
    Posts
    11

    Re: Absence Periods Calculation

    Quote Originally Posted by humdingaling View Post
    does this work for you?
    that seems to have worked thanks very much, would i be able to dump in data in the same format into the first 3 columns (staff, start and end) and the formulae will pick up the rest?

  6. #6
    Registered User
    Join Date
    05-21-2014
    Posts
    11

    Re: Absence Periods Calculation

    Hi, is there anyway of changing the code to ignore weekends so that the absence is linked.

    Appreciate the help

    Marv

  7. #7
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Absence Periods Calculation

    answer to first question is yes
    to the 2nd question
    i have an idea to use either Weekday() formula in conjunction with deducting end date with start date of following line but i am unsure of syntax that will align with what you want
    Can you clarify how you want to skip the weekend?

  8. #8
    Registered User
    Join Date
    05-21-2014
    Posts
    11

    Re: Absence Periods Calculation

    Hi, sorry bit late for a reply.. Did you manage to be able to adjust the formula on my previous sheet to ignore weekends. I just need it to ignore the Saturday and Sundays that pop up so it treats any date on a friday or monday as linked. Regards

  9. #9
    Registered User
    Join Date
    05-21-2014
    Posts
    11

    Re: Absence Periods Calculation

    Quote Originally Posted by humdingaling View Post
    answer to first question is yes
    to the 2nd question
    i have an idea to use either Weekday() formula in conjunction with deducting end date with start date of following line but i am unsure of syntax that will align with what you want
    Can you clarify how you want to skip the weekend?
    Hi, sorry bit late for a reply.. Did you manage to be able to adjust the formula on my previous sheet to ignore weekends. I just need it to ignore the Saturday and Sundays that pop up so it treats any date on a friday or monday as linked. Regards

  10. #10
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Absence Periods Calculation

    dele...dont usually proceed with anything if people stop responding
    it usually means they figured it out and plain moved on

    also as i really don't know exactly what you want i didnt know how to proceed

    i added some lines and a table to your original sheet
    please indicate the lines you want skipped?

    6 and 7 = Saturday and Sunday respectively
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    05-21-2014
    Posts
    11

    Re: Absence Periods Calculation

    Quote Originally Posted by humdingaling View Post
    dele...dont usually proceed with anything if people stop responding
    it usually means they figured it out and plain moved on

    also as i really don't know exactly what you want i didnt know how to proceed

    i added some lines and a table to your original sheet
    please indicate the lines you want skipped?

    6 and 7 = Saturday and Sunday respectively
    Hi, understood, got completely caught in something else. Yes lines 6 and 7 need to be ignored with both 1 and 5 linked to form one period. For example, staff member 439 should have 3 periods not 5 (2 really because there are 2 bank holidays but ignore, i dont want to over complicate) Thanks again

  12. #12
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Absence Periods Calculation

    hmm missing something
    439 i still get 4

    439 17-Feb-14 21-Feb-14 439
    439 4-Mar-14 24-Mar-14
    439 25-Mar-14 28-Mar-14 439
    439 31-Mar-14 31-Mar-14
    439 1-Apr-14 4-Apr-14 439
    439 7-Apr-14 11-Apr-14
    439 12-Apr-14 17-Apr-14
    439 21-Apr-14 25-Apr-14 439

  13. #13
    Registered User
    Join Date
    05-21-2014
    Posts
    11

    Re: Absence Periods Calculation

    Quote Originally Posted by humdingaling View Post
    hmm missing something
    439 i still get 4

    439 17-Feb-14 21-Feb-14 439
    439 4-Mar-14 24-Mar-14
    439 25-Mar-14 28-Mar-14 439
    439 31-Mar-14 31-Mar-14
    439 1-Apr-14 4-Apr-14 439
    439 7-Apr-14 11-Apr-14
    439 12-Apr-14 17-Apr-14
    439 21-Apr-14 25-Apr-14 439
    hi, thought i replied to this thread.
    28 Mar and 31 Mar are linked as they are both 1 and 5
    4 Apr and 7 Apr are linked as they are both 5 and 1
    So, dates are 17 Feb-21Feb, 4 Mar-17 Apr and 21 Apr-25 Apr = 3 periods

  14. #14
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Absence Periods Calculation

    based on that criteria
    i made some amendments to the formula
    439 shows as 3 now

    used column F again just so the formula looks neater to troubleshoot
    if the final formula you can incorprate the weekend() bit into the if formula
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    05-21-2014
    Posts
    11

    Re: Absence Periods Calculation

    Quote Originally Posted by humdingaling View Post
    based on that criteria
    i made some amendments to the formula
    439 shows as 3 now

    used column F again just so the formula looks neater to troubleshoot
    if the final formula you can incorprate the weekend() bit into the if formula
    Great, thanks again for the help
    D

  16. #16
    Registered User
    Join Date
    05-21-2014
    Posts
    11

    Re: Absence Periods Calculation

    Quote Originally Posted by humdingaling View Post
    based on that criteria
    i made some amendments to the formula
    439 shows as 3 now

    used column F again just so the formula looks neater to troubleshoot
    if the final formula you can incorprate the weekend() bit into the if formula
    Hi, one slight question

    Is it possible to ignore the 'join if 1 and 5 are together' if days 1 and 5 have at least 5 days between them ?
    For example, the first employee 88 is saying 1 period when it should be 2, because it is treating the last 2 absences (1 Nov 13 & 25 Nov 13 ) as linked due to both being day1 and day5, when in fact they are days apart. Does this make sense?

  17. #17
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Absence Periods Calculation

    i added an additional check

    if end day is 5 AND start day next line is 1 AND if end day-start day next line is 3 [this means its linked week) then ignore
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    05-21-2014
    Posts
    11

    Re: Absence Periods Calculation

    Quote Originally Posted by humdingaling View Post
    i added an additional check

    if end day is 5 AND start day next line is 1 AND if end day-start day next line is 3 [this means its linked week) then ignore
    great, I think you've nailed it! thanks again

+ 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. SSP calculation to Look up between a range of dates with linked periods
    By mcinnes01 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-09-2020, 04:46 AM
  2. Calculation for biweekly pay periods in a given month
    By cstricklin in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-11-2020, 04:33 PM
  3. Counting the number of periods (not days) of absence in Excel
    By petedacreep in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-20-2016, 09:42 AM
  4. Date calculation-certain periods
    By Lennakame in forum Excel General
    Replies: 1
    Last Post: 05-24-2010, 04:30 PM
  5. Absence Monitoring Help
    By Lexx Diggler in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2009, 05:08 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