Function Problems

How to Calculate Bonus Days Based on Hours Worked in Excel

Emma BrownEmma Brown Nov 11, 2026 868 views

Question details

The user needs to calculate the number of bonus or holiday days an employee has earned based on their total hours worked, utilizing a defined range lookup table.

How to Calculate Bonus Days Based on Hours Worked in Excel
Product
Excel
Device & OS
not provided
Scenario
Automating HR or payroll calculations where specific intervals of hours worked qualify for a corresponding number of days off.
Observed behavior
The user needs a formula to look up a value within defined ranges and return the corresponding bonus days, avoiding the need to manually check each employee's hours against the interval criteria.
Before you start

Ensure your data is organized into a clear lookup table, with the minimum hours required in one column and the corresponding bonus days in the adjacent column, sorted in ascending order.

Solution 1Recommended

Use XLOOKUP for Approximate Matching

XLOOKUP is the most modern and efficient way to perform approximate matches across defined ranges without needing complex array formulas.

XLOOKUP allows you to search for a value and return a corresponding result from another column. By setting the match mode to 1 or -1, it can easily evaluate numerical tiers and ranges.

1
Set up your lookup table

Create a reference table where column A contains the hour thresholds (e.g., A3:A12) and column B contains the corresponding bonus days (B3:B12).

2
Select the target cell

Click on the cell where you want the calculated bonus days for a specific employee to appear.

3
Enter the XLOOKUP formula

Type the formula =XLOOKUP(C3, A3:A12, B3:B12, , 1), replacing C3 with the cell containing the employee's actual hours worked.

4
Apply the formula

Press Enter to get the result. The '1' match mode ensures that if an exact match isn't found, the formula returns the next larger item in your threshold list.

Use XLOOKUP for Approximate Matching
Using Inline Arrays: If you prefer not to create a separate reference table on your sheet, you can hardcode the arrays directly into the formula, like this: =XLOOKUP(C3,{200,450,700},{0,2,3},,1).
Calculate Data Easily in WPS Spreadsheet

Use WPS Spreadsheet to Calculate Bonus Days

WPS Spreadsheet fully supports modern functions like XLOOKUP, making it incredibly easy to calculate tiered bonuses, holidays, and payroll data without lag or compatibility issues.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your employee hours.
  2. 2. Create the lookup table: Set up your reference table with the hour thresholds and corresponding bonus days.
  3. 3. Enter the formula: Type =XLOOKUP() into your target cell, selecting your lookup value, lookup array, and return array.
  4. 4. Calculate instantly: Press Enter to instantly calculate the accrued time off and drag the formula down for all rows.
Fully supports XLOOKUP, INDEX, and MATCH functionsSeamless compatibility with Microsoft Excel (.xlsx) formatsLightweight, fast, and completely free to useBuilt-in templates for HR and payroll management
QA img-9

Frequently Asked Questions

What does the '1' mean at the end of the XLOOKUP formula?

The '1' specifies the match mode for XLOOKUP. It tells the function that if an exact match isn't found, it should return the next larger item in the lookup array. If your logic requires rounding down to the next smaller item, you should use '-1' instead.

Can I use VLOOKUP instead of XLOOKUP for this?

Yes, you can use VLOOKUP for tiered calculations by setting the final argument (range_lookup) to TRUE (or 1) for an approximate match. However, your lookup table must be sorted in ascending order for VLOOKUP to return accurate results.

Why does my XLOOKUP return an #N/A error?

This error usually occurs if the lookup value is not found and no 'if_not_found' parameter is specified. In the context of approximate matches, it can also happen if the search value falls outside the defined range and the match mode isn't correctly configured to handle it.

How do I enter an array formula in older spreadsheet versions?

Instead of just pressing Enter after typing your formula, you must press Ctrl + Shift + Enter simultaneously. The spreadsheet will automatically wrap the formula in curly braces {} to indicate it is being evaluated as an array formula.