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

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
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
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
Do you mean like this?
Yes, exactly. Thanks.

The problem is that your SUM formula in column AI is summing from column B. It should only sum from column D.

23 10 11.xlsm
BCDGIJOPQRVWXYABACADAEAFAGAHAIAK
2NONAMASEPTEMBERMENIT TELAT
314671213141519202122252627282930
4MasukMasukMasukMasukMasukMasukMasukMasukMasukMasukMasukMasukMasukMasukMasukMasukMasukMasuk
51Agnes0:000
62Alvita2:512:5170
73Anggraeni Wibowo0:120:120
84Anita0:000
95Dyah R0:060:090:150
106Fauziah Nur Sapitri0:170:010:030:210
117Gisella Anggasta0:000
128Heri Setyo Budi0:010:210:060:030:080:040:160:140:161:2950
Deduction (2)
Cell Formulas
RangeFormula
AI5:AI12AI5=SUM(D5:AH5)
AK5:AK12AK5=LOOKUP(AI5*1440,{0,31,101,301,401,501,601},{0,50,70,90,110,130,150})
 
Upvote 1
Solution
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

Forum statistics

Threads
1,216,077
Messages
6,128,679
Members
449,463
Latest member
Jojomen56

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