Attendance Sheet in Excel with Formula for Half Day (3 Examples)

In this tutorial, we will assume you have an attendance sheet of 10 workers for the month of January in 2022. You have a record of the holidays of the given month and the leaves taken by each employee. The resulting dataset looks like the image below:

Excel Attendance Sheet Information

From here, the employees have taken both full day leaves and half day leaves.

Excel Attendance Sheet

Now, you can calculate the proper count of leaves including the half-day counts using the three formulas given below.


Method 1 – Use COUNTIFS Function

Steps:

  • Make a new column for each employee to calculate their total leaves.
  • Click on the C5 cell and insert the following formula.
=COUNTIFS('Attendance Sheet'!C8:AG8,"PL")+COUNTIFS('Attendance Sheet'!C8:AG8,"A")+COUNTIFS('Attendance Sheet'!C8:AG8,"HL")/2

Use COUNTIFS Function to Calculate Half Day in Excel Attendance Sheet

Formula Breakdown:

=COUNTIFS(‘Attendance Sheet’!C8:AG8,”PL”)

This returns you the result of how many “PL” values are there in the range of C8:AG8 cells in the Attendance Sheet worksheet.

Result: 0

COUNTIFS(‘Attendance Sheet’!C8:AG8,”A”)

This returns you the result of how many “A” values are there in the range of C8:AG8 cells in the Attendance Sheet worksheet.

Result: 0

COUNTIFS(‘Attendance Sheet’!C8:AG8,”HL”)/2

This returns the result of how many “HL” values are there in the range of C8:AG8 cells in the Attendance Sheet worksheet. The result is divided by 2.

Result: 0

=COUNTIFS(‘Attendance Sheet’!C8:AG8,”PL”)+COUNTIFS(‘Attendance Sheet’!C8:AG8,”A”)+COUNTIFS(‘Attendance Sheet’!C8:AG8,”HL”)/2

This sums up all the previous breakdown results.

Result: 0

  • Hit the Enter button.
  • You should see the total leaves of the first employee, John.
  • Place your cursor in the bottom right position of C5.
  • Drag the Fill Handle downward.

Drag the Fill Handle Downward to Copy Same Formula

The result would look like this.

Total Leaves Including the Half Days

Read More: How to Create Employee Attendance Sheet with Time in Excel


Method 2 – Use the SUMPRODUCT Function

Steps:

  • Click on the C5 cell.
  • Write the following formula in the formula bar.
=SUMPRODUCT(('Attendance Sheet'!C8:AG8="PL")+('Attendance Sheet'!C8:AG8="A")+('Attendance Sheet'!C8:AG8="HL")/2)

Use the SUMPRODUCT Function to Calculate Half Days in Excel Attendance Sheet

  • Press the Enter button.
  • You should see the total leaves taken by John.
  • Place your cursor in the bottom right position of the cell.
  • Drag the Fill Handle down to copy the formula to all the other cells below.

Drag the Fill Handle Below to Copy Same Formula

Your output should look like this.

Total Leaves Including Half Days

Read More: How to Create a Monthly Staff Attendance Sheet in Excel


Method 3 – Combine the SUM and COUNTIFS Functions

Steps:

  • Click on the C5 cell and insert the following formula.
=SUM(COUNTIFS('Attendance Sheet'!C8:AG8,{"PL","A","HL"})*{1,1,0.5})

Combine the SUM and COUNTIF Function to Calculate Half Day in Excel Attendance Sheet

Formula Breakdown:

COUNTIFS(‘Attendance Sheet’!C8:AG8,{“PL”,”A”,”HL”})*{1,1,0.5}

This function finds the “PL”, “A”, and “HL” values in the range of C8:AG8 cells of the Attendance Sheet. Afterward, they multiply the results by 1, 1, and 0.5 respectively.

Result:0,0,0

=SUM(COUNTIFS(‘Attendance Sheet’!C8:AG8,{“PL”,”A”,”HL”})*{1,1,0.5})

This sums up the results got by the COUNTIFS function.

Result: 0

  • Hit the Enter button.
  • Place your cursor in the bottom right position of the cell.
  • Use the black Fill Handle to drag the formula down to the other cells.

Drag Fill Handle Below to Copy Same Formula

The outcome should look like this.

Total Leaves with Half Days

Read More: Attendance and Overtime Calculation Sheet in Excel


Download Practice Workbook

You can download our practice workbook from here for free!


Related Articles


<< Go Back to Employee Attendance Sheet Excel | Excel HR Templates | Excel Templates

Get FREE Advanced Excel Exercises with Solutions!
Tanjim Reza
Tanjim Reza

Md. Tanjim Reza Tanim, a BUET graduate in Naval Architecture & Marine Engineering, contributed over one and a half years to the ExcelDemy project. As an Excel & VBA Content Developer, he authored 100+ articles and, as Team Leader, reviewed 150+ articles. Tanim, leading research, ensures top-notch content on MS Excel features, formulas, solutions, tips, and tricks. His expertise spans Microsoft Office Suites, Automating Finance Templates, VBA, Python, and Developing Excel Applications, showcasing a multifaceted commitment to the... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo