How do I calculate salary deductions based on late attendance in minutes?

itgldmrt

New Member
Joined
Sep 26, 2023
Messages
8
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2010
  6. 2007
Platform
  1. Windows
Below is the table for late attendance deductions:
1696994160889.png


This is monthly attendance data and for example:
1696994774289.png


How do you calculate late attendance deductions with the above data based on minutes?
In the example above, an employee with the name Nara Susilowati has a salary of 10,000/month. This month, she was late, with a total of 17:11. So she is subject to a deduction >=601 = 150.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Try this. Adjust cell reference as needed.

Excel Formula:
=CHOOSE(MATCH(A1*1440,{0,31,101,301,401,501,601},1),0,50,70,90,110,130,150)
 
Upvote 1
I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.

An easy way would be to re-design the lookup table like below (though the middle column is not actually required).

23 10 11.xlsm
BCDEFGH
1LateDeduction
2030017:11150
331100500:230
4101300702:0570
5301400909:00130
6401500110
7501600130
8601150
Deduction
Cell Formulas
RangeFormula
H2:H5H2=VLOOKUP(G2*1440,B$2:D$8,3)
 
Upvote 0
Try this. Adjust cell reference as needed.

Excel Formula:
=CHOOSE(MATCH(A1*1440,{0,31,101,301,401,501,601},1),0,50,70,90,110,130,150)
If hard-coding the values into the formula then you could do it with a single function like this.

23 10 11.xlsm
GK
1LateDeduction
217:11150
30:230
42:0570
59:00130
Deduction
Cell Formulas
RangeFormula
K2:K5K2=LOOKUP(G2*1440,{0,31,101,301,401,501,601},{0,50,70,90,110,130,150})


In my mind though the lookup table has the advantage that if the range limits or deduction amounts change, that only needs to be done in one place rather that alter a formula and copy it to all the relevant cells.
 
Upvote 0
Can you give us that sample data with XL2BB as mentioned above? Then we ccould be sure to be testing with the same data/values/formulas that you are.
 
Upvote 0
Try this. Adjust cell reference as needed.

Excel Formula:
=CHOOSE(MATCH(A1*1440,{0,31,101,301,401,501,601},1),0,50,70,90,110,130,150)
Sorry, it works if the time is not a formula. However, the total late attendance using the “SUM” formula is why it doesn't work.
What if the formula could be used with the "SUM" formula?
 
Upvote 0
Can you give us that sample data with XL2BB as mentioned above? Then we ccould be sure to be testing with the same data/values/formulas that you are.
Your formula also works but is hampered by the total "SUM" formula that I mentioned above.
 
Upvote 0
Sorry, it works if the time is not a formula. However, the total late attendance using the “SUM” formula is why it doesn't work.
What if the formula could be used with the "SUM" formula?
It should still work when referencing a formula. I recreated the first row of your data. The sum doesn't add up to 6:57 as you showed. I'm not sure whatelse is going on with your sheet. Please do as @Peter_SSs asked and upload a minisheet using XL2BB.

Book4
ABCDEFGHI
1Late in hoursDeduction
20:580:210:350:290:230:281:024:1670
Sheet1
Cell Formulas
RangeFormula
H2H2=SUM(A2:G2)
I2I2=CHOOSE(MATCH(H2*1440,{0,31,101,301,401,501,601},1),0,50,70,90,110,130,150)
 
Upvote 0
Sorry, it works if the time is not a formula. However, the total late attendance using the “SUM” formula is why it doesn't work.
What if the formula could be used with the "SUM" formula?
Please refer to post #6

The sum doesn't add up to 6:57 as you showed.
I'm assuming that the SUM formula includes all the hidden columns between columns C & P since row 3 looks like dates.
 
Last edited:
Upvote 1

Forum statistics

Threads
1,215,328
Messages
6,124,299
Members
449,149
Latest member
mwdbActuary

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top