Ravindra BagaleCourses & study guides मराठी Track your progress

21. Real-World Project Briefs

21.4 HR Attendance and Payroll Sheet

The ask. Ravina, the store lead, keeps attendance. At month end Shahrukh in HR needs present days, overtime pay and the payable amount for each person, rounded to the rupee. Salaries here are fictional practice numbers.

Sheet Payroll, A1:F6. Working days in the month = 26 (cell I1, named WorkDays). Fictional data:

A: Name B: Role C: Monthly salary (₹) D: Present days E: OT hours F: OT rate (₹/hr)
Raja Rider 15,600 26 10 60
Rani Picker 13,000 24 0 50
Salman Rider 15,600 22 6 60
Ravina Store lead 23,400 26 4 90
Zoya Picker 13,000 25 8 50

What to deliver (one under the other):

  1. Make the range a Table named tblPay and name cell I1 WorkDays.
  2. Add Attendance % = Present days ÷ WorkDays.
  3. Add Earned salary = Monthly salary ÷ WorkDays × Present days.
  4. Add OT pay = OT hours × OT rate.
  5. Add Payable = ROUND(Earned salary + OT pay, 0).
  6. Total the Payable column and check it against the bank upload file.

Key formulas (row 2; copy down or let the Table fill them):

G2: =[@[Present days]]/WorkDays
H2: =[@[Monthly salary (₹)]]/WorkDays*[@[Present days]]
I2: =[@[OT hours]]*[@[OT rate (₹/hr)]]
J2: =ROUND([@[Earned salary]]+[@[OT pay]],0)

Expected result (check your numbers):

Name Attendance % Earned salary (₹) OT pay (₹) Payable (₹)
Raja 100.0% 15,600.00 600 16,200
Rani 92.3% 12,000.00 0 12,000
Salman 84.6% 13,200.00 360 13,560
Ravina 100.0% 23,400.00 360 23,760
Zoya 96.2% 12,500.00 400 12,900

Total payable = ₹78,420.

Checks before you send it:

  1. WorkDays is one named cell, not typed into every formula.
  2. Rounding happens once, on the final Payable.
  3. Present days never exceed WorkDays (add Data Validation).
  4. This is a practice sheet. Real payroll also needs statutory deductions; ask your HR or CA team for the current rules.

Ravindra Bagale's Tip

Keep working days in one named cell. When the month has 25 working days instead of 26, you change one cell, not twenty formulas.

Next step: turn this payroll sheet into a printable, one-page slip per employee with an employee drop-down and XLOOKUP. See 21.11 Salary Slip Creation.

Loading practice tasks...

  1. Total leave days (Easy): Add up Leave days in D2:D11. (sheet "Data")
  2. Average salary (Easy): Average of E2:E11, rounded to 2 decimals. (sheet "Data")
  3. Rows in Sales (Easy): How many rows have Department "Sales"? (sheet "Data")
  4. Largest leave days (Easy): The largest value in D2:D11. (sheet "Data")
  5. Days taken (Easy): C2 minus B2. (sheet "Dates")
  6. Start year (Easy): Year of B3. (sheet "Dates")
  7. Due month (Easy): Month number of C3. (sheet "Dates")
  8. Earliest start (Easy): Earliest date in B2:B9 (as a date number). (sheet "Dates")
  9. Leave days for Sales (Medium): Total of D2:D11 where B is "Sales". (sheet "Data")
  10. Sales in Denver (Medium): Total of D2:D11 where B is "Sales" and C is "Denver". (sheet "Data")
  11. Working days (Medium): Working days from B2 to C2. (sheet "Dates")
  12. Weekday of due (Medium): Weekday number of C4 (Sunday = 1). (sheet "Dates")