+ Reply to Thread
Results 1 to 7 of 7

Calculate penalty for absence in this month

  1. #1
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Calculate penalty for absence in this month

    Hello everybody,
    Could you help me calculate penalty for absence in this month, please?
    -This is attendance sheet for employees in 3-2019
    -"0" refers to absence
    -Penalty for absence can be calculated like this:

    No. of days Penalty
    1st 1.25
    2nd 1.50
    3rd 2.00
    4th 2.00
    5th 2.00
    Etc… 2.00

    -And this penalty is applied from the beginning of the year(2019),so you should take the other sheet (Whole 2019 absence)into your consideration while calculating
    -I recommend using formula but if not possible you can use UDF
    -Office 365 proplus
    sorry for my bad English
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,799

    Re: Calculate penalty for absence in this month

    Some of your manual calculations are not correct based on the requirement for absence over the whole year to date. This seems to work with that taken into account:

    =LOOKUP(INDEX('Whole 2019 absence'!$AG$4:$AG$15,MATCH('3'!A4,'Whole 2019 absence'!$A$4:$A$15,0)),{1,2,3},{1.25,1.5,2})
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Calculate penalty for absence in this month

    Thank you AliGW for your quick reply,but your formula gives wrong results
    I could modify it but it also gives 2 wrong results only,see the attachment:
    Please Login or Register  to view this content.
    Another example to understand what I want:
    If an employee has 3 absence days this month and he doesnot have absence in previous months:
    1st day=1.25
    2nd day=1.5
    3rd day=2
    total penalty is 1.25+1.5+2=4.75
    I hope you understand me
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Calculate penalty for absence in this month

    Is there anything unclear?

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,799

    Re: Calculate penalty for absence in this month

    No, but it’s the Easter weekend and I am not at my PC. So this is a tiered penalty? Hopefully someone else will have the time to look at it, but i shan’t probably before Wednesday.

  6. #6
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Calculate penalty for absence in this month

    No problem AliGW
    Happy Easter!

  7. #7
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Calculate penalty for absence in this month

    This first attempt uses Ali's approach and generates the desired penalties. The problem is that (unlike Ali's version) the array constants need to be populated for as many elements as your expected maximum possible number of absences for the year and to make matters worse the formula is repeated (with a minor change) twice over. This may become impractical to create/maintain if you expect more than a dozen or so absences.

    In AK4 copied down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Here is a second attempt that relies on the penalty table that you provided in the March worksheet starting at F3. This approach is probably easier to adapt to a larger max number of absences. The penalty table can be cut/pasted to somewhere else, maybe even on its own worksheet. As with the array constants in the first approach this table will need to be expanded for as many rows as your expected maximum possible number of absences for the year. This approach is essentially the first approach except with a helper table instead of array constants.

    In AL4 copied down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Maybe there is a simpler approach but you may have to wait for Ali

    The attached modified workbook includes both of the above proposed solutions.
    Attached Files Attached Files

+ 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. [SOLVED] Trying to calculate pay with variable Penalty Rates
    By GoodShekky in forum Excel General
    Replies: 10
    Last Post: 11-12-2018, 09:35 PM
  2. Replies: 1
    Last Post: 10-19-2018, 12:55 PM
  3. Sickness Absence by Month
    By JoeMac89 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-02-2017, 05:04 PM
  4. Calculate KPI penalty
    By wintheranders in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-01-2013, 06:07 AM
  5. Calculate difference between dates, plus penalty
    By asoom in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-16-2013, 02:16 PM
  6. Calculate sick absence by days per month.
    By Pegs in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-10-2013, 06:57 AM
  7. [SOLVED] Calculate between start and finish times to pay a shift penalty
    By jonas245 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-06-2013, 05:46 PM

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