+ Reply to Thread
Results 1 to 3 of 3

Rolling formula for each week to check for sickness - LET/COUNTIFS

  1. #1
    Registered User
    Join Date
    05-30-2023
    Location
    Ireland
    MS-Off Ver
    365
    Posts
    6

    Rolling formula for each week to check for sickness - LET/COUNTIFS

    Hi,

    I'm trying to have a formula to calculate my sick paid and sick unpaid. The allowance for the whole year is 3 days paid=24 hours. The rest needs to go to unpaid column. However, in each period this rule needs to be checked for in the previous period as well. If I reach 24 hrs in week 1 and I am sick again in week 2, the sick leave will go to unpaid.

    I've been using the below but it keeps transferring to each week - so I have 3x SL in PERIOD1WK1 and I can see the same amount of sick hours again in wk2. In week 2 this column should equal to 0 and Sick unpaid should kick in.

    =LET(prevSickPd,SUMIFS($K8:W8,$K$7:W$7,"Sick Paid"),totalSickPd,COUNTIFS($K8:W8,"SL",$K$7:W$7,"Shift")*8,currentSickPd, totalSickPd - prevSickPd,MEDIAN(24-prevSickPd,currentSickPd,0))

    Thank you.


    Lucie.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Rolling formula for each week to check for sickness - LET/COUNTIFS

    Personally, I think it's OK. The formula is showing the CUMULATIVE amount of sick leave, for all periods to date, not the sick leave in that INDIVIDUAL period. Seeing the cumulativer total enables you to gain the entire picture by looking at the current week only... without having to look at EVERY week in the period.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    05-30-2023
    Location
    Ireland
    MS-Off Ver
    365
    Posts
    6

    Re: Rolling formula for each week to check for sickness - LET/COUNTIFS

    Hi Glenn, thanks for checking. Yep, I want it to be checking the weeks in this manner - as in take into consideration the cumulative amount. But if they are sick in one week - let's say 8 hrs, I only want to see the hours in sick paid for that specific week. If the 8 hrs go automatically to next week, it affects the next week's payroll because it shows they need to be paid for 8 hrs sick leave. I'm not sure if the explanation I give makes sense.

+ 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. Formula to count Rolling Year Sickness Episodes
    By clementb in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-17-2022, 11:46 AM
  2. 12 month rolling formula in sickness record issue.
    By Bobo_Grimmer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-06-2022, 05:57 AM
  3. [SOLVED] Sickness tracker with a rolling 12 months
    By sophie-edge24 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-05-2019, 12:59 AM
  4. [SOLVED] Sickness tracker with a rolling 12 months
    By sophie-edge24 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-04-2019, 04:30 PM
  5. Rolling Sickness
    By OxJ in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 01-11-2017, 08:38 AM
  6. Calculating Total Sickness in a rolling 12 month Period
    By china in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 09-08-2015, 08:04 AM
  7. Rolling sickness tracking at work
    By dnlshllrd in forum Excel General
    Replies: 6
    Last Post: 06-19-2014, 11:20 AM

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