+ Reply to Thread
Results 1 to 6 of 6

Consecutive Occasions discounting weekends

  1. #1
    Registered User
    Join Date
    09-19-2022
    Location
    London
    MS-Off Ver
    MS Office 2016
    Posts
    3

    Consecutive Occasions discounting weekends

    Hi everyone,

    I hope you can help me out. I have watched numerous videos, read multiple forums and help pages and I can't figure out the formula I need.

    My company have launched a new policy for absence management with new company sick pay entitlements and trigger points, I have been tasked with creating the absence tracker to reflect this for all employees.

    I have attached what I have done so far, the part I am struggling with is the trigger points, if an employee like employee 9 is off on LTS it counts the occasions as multiple occasions as we do not enter data on the weekend dates but my formula will count this as multiple occasions I need to count as 1 occasion as the total days off in a year is correct.

    I have tried changing the formula in the days off in a year so we enter the data on a Saturday and Sunday, as it gets the occasions right but then the total days off is too many, i tried to correct that by /365 * 260 but then that is wrong from people who are not on LTS.

    Please can you help me find a formula to count the occasions as continuous if they present like the above? I may have to throw my laptop out of the window if no one can help me!

    Thank you soooooo much in advance

    Absence Tracker for Help.xlsx

    Last edited by AliGW; 09-24-2022 at 06:45 AM. Reason: Irrelevant section of title removed.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,685

    Re: Consecutive Occasions discounting weekends

    Can't you just omit the weekend dates from those on row 2 (starting from O2)? You can generate these if you have a weekday in cell O2 by using this formula in P2:

    =O2+IF(WEEKDAY(O2,2)=5,3,1)

    then copy across. You might like to change the formula in O3 to this:

    =LEFT(TEXT(O2,"ddd"),2)

    then copy this across. Obviously, you won't need as many columns to get to the end of the year, so you might have the change where the months appear on row 1.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    09-19-2022
    Location
    London
    MS-Off Ver
    MS Office 2016
    Posts
    3

    Re: Consecutive Occasions discounting weekends

    Hi Pete,

    Unfortunately, I need to have the weekends in as we have shifts where people where weekends too, so will need to log if people on that shift are sick too

    Will the above formulas work if I keep the weekends in ?

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,685

    Re: Consecutive Occasions discounting weekends

    You can just use this in P2:

    =O2+1

    if you want to include every day. The other formula (in O3) just gives you the day of the week as a 2-character day, so you don't need to adjust the column width to see them.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    09-19-2022
    Location
    London
    MS-Off Ver
    MS Office 2016
    Posts
    3

    Re: Consecutive Occasions discounting weekends

    Hi Pete,

    I just tried the formula you suggested and not sure I portrayed what I was looking for very well.

    I am trying to correct my formula in J to count occasions of absence in the last 12 weeks which I have managed to do. However if an employee for instance Employee 9 has been off sick since June he is showing as 13 occasions of absence in the last 12 weeks but I need it count each occasion with a break as 1 occasion?

    Hope that makes sense?

    Thanks

    Not sure if that makes sense?

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,729

    Re: Consecutive Occasions discounting weekends

    i have just tried a formula array - but it slows the spreadsheet down to unusable - i suspect you may need VBA
    =IF(A4="","",SUM((FREQUENCY(IF(O4:NO4="S",COLUMN(O4:NO4)),IF(IF((TEXT(O$3:NO$3,"ddd")<>"Sat")*(TEXT(O$3:NO$3,"ddd")<>"Sun"),O4:NO4,"S")<>"S",COLUMN(O4:NO4)))>0)*1))
    this will also need to be modified for the weeks you are after
    if you use
    =IF(A4="","",SUM((FREQUENCY(IF(O4:APB4="S",COLUMN(O4:APB4)),IF(IF((TEXT(O$3:APB$3,"ddd")<>"Sat")*(TEXT(O$3:APB$3,"ddd")<>"Sun"),O4:APB4,"S")<>"S",COLUMN(O4:APB4)))>0)*1))
    unusable

    A UDF (VBA may help) - I do not provide solutions in vba


    see comments for formula
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

+ 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. Count Consecutive Occurrences of Absence including weekends
    By Polymorph in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2021, 05:23 PM
  2. Determining Consecutive weekends worked
    By WTODD in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-04-2017, 12:35 PM
  3. [SOLVED] Discounting costs and outcomes
    By Ziza in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-05-2015, 08:45 PM
  4. complex discounting programs
    By jcc5018 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2014, 06:57 PM
  5. Mid Period Discounting with the NPV Function
    By apubapu82 in forum Excel General
    Replies: 5
    Last Post: 05-15-2006, 11:40 PM
  6. Blanking / Discounting zero values in ranges
    By RobPot in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-24-2005, 08:16 PM
  7. Financial formula for Discounting Cashflows
    By Jeff in forum Excel General
    Replies: 2
    Last Post: 02-15-2005, 06:45 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