Function Problems

Return Benefit Package Labels by Years of Service in Excel

Adam DavisAdam Davis Dec 2, 2026 869 views

Question details

Assign a benefit package label based on an employee's length of service.

Return Benefit Package Labels by Years of Service in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Years of service are entered in a worksheet, and each employee needs an A1, A2, or A3 benefit package label.
Observed behavior
The desired result is A1 for less than two years, A2 for two to less than five years, and A3 for five years or more.
Before you start

Enter years of service as nonnegative numbers in column C, starting at C2. Choose an empty cell for the benefit label; the examples below use D2.

Solution 1Recommended

Use LOOKUP to assign labels from service thresholds

Use this formula to match each service value to the appropriate lower threshold and leave empty input cells blank.

LOOKUP selects the largest threshold that is less than or equal to the value in C2. The thresholds must remain in ascending order, and this formula assumes service values are nonnegative.

1
Enter the formula

Select D2 and enter =IF(C2="","",LOOKUP(C2,{0,2,5},{"A1","A2","A3"})).

2
Apply it to other employees

Select D2 and drag its fill handle down column D to copy the formula to the remaining employee rows.

3
Check the boundaries

Enter sample values in column C: 1.5 should return A1, 2 should return A2, and 5 should return A3.

Use LOOKUP to assign labels from service thresholds
Check negative values: A negative value is below the first LOOKUP threshold of 0 and returns #N/A. Correct the service value or adjust the formula if negative inputs need special handling.
WPS Spreadsheets

Assign benefit labels by service range in WPS Spreadsheets

Use a nested IF formula in WPS Spreadsheets to return A1, A2, or A3 for each employee's years of service and keep blank inputs empty.

  1. 1. Open the spreadsheet: Open WPS Office, select Spreadsheets, and open your employee workbook.
  2. 2. Check the service values: Enter or verify nonnegative years of service in column C, starting at C2.
  3. 3. Enter the label formula: Select D2 and enter =IF(C2="","",IF(C2<2,"A1",IF(C2<5,"A2","A3"))).
  4. 4. Fill the remaining rows: Drag the fill handle from D2 down column D, then use Save to save the workbook.
Assign benefit labels using numeric service rangesOpen and edit Microsoft Excel XLSX filesUse a familiar spreadsheet interfaceCopy formulas down employee lists quickly
microsoft office alternative - wps office

Frequently Asked Questions

Which label does an employee with exactly two years of service receive?

The employee receives A2. In the formulas, A1 applies below 2, while A2 begins at 2 and continues up to, but not including, 5.

What happens when the years-of-service cell is empty?

The outer IF(C2="","",...) in either formula returns an empty string, so the benefit label cell appears blank.

Why does the LOOKUP formula return #N/A?

A negative value in C2 is below the first threshold of 0, so LOOKUP cannot find a match. Check that the service value is a nonnegative number.

How do I use the formula if years of service are in another column?

Replace each C2 reference in the formula with the cell containing the first employee's service value, then copy the formula down using the fill handle.