Function Problems

WPS Spreadsheet: Use IF, IFS, and Lookup Formulas for Manager Names

John WilsonJohn Wilson Nov 12, 2026 869 views

Question details

The user needs to return a manager name based on a department or team value in a spreadsheet.

Product
WPS Spreadsheet
Device & OS
not provided
Scenario
A department value is entered in a cell such as H2, and the sheet should display the corresponding manager using IF, IFS, XLOOKUP, or VLOOKUP.
Observed behavior
The desired result is a matching manager name, with a fallback such as "No Match" when the department is not listed.
Before you start

Identify the cell containing the department value and decide whether the mapping will stay small or change regularly. For a maintainable setup, prepare a two-column table with department names in the first column and manager names in the second.

Solution 1Recommended

Use a department-to-manager lookup table with XLOOKUP

Use this approach when department assignments may change or when you want to add departments without rewriting a long formula.

A lookup table keeps department and manager names separate from the formula, making the worksheet easier to update. XLOOKUP is available in newer spreadsheet versions and can return a custom result when no match is found.

1
Create the mapping table

In an empty area of the WPS Spreadsheet worksheet, enter department names in one column and their manager names in the adjacent column, such as Admin/Peter, Education/John, Medical/Mary, and Surgical/Harry.

2
Select the result cell

Click the cell where the manager name should appear, such as I2, beside the department value in H2.

3
Enter the XLOOKUP formula

In the formula bar or selected cell, enter =XLOOKUP(H2,DepartmentRange,ManagerRange,"No Match"), replacing DepartmentRange and ManagerRange with the actual department and manager ranges.

4
Fill the formula down

Press Enter, then drag the fill handle from the result cell down the column to return a manager for each department value.

Maintainable setup: If XLOOKUP is unavailable in your WPS Spreadsheet version, use VLOOKUP with a table range, such as =IFERROR(VLOOKUP(H2,A2:B5,2,FALSE),"No Match").

Match Departments to Manager Names in WPS Spreadsheet

WPS Spreadsheet lets you build department-to-manager mappings with nested IF, IFS, XLOOKUP, or VLOOKUP formulas. Create a maintainable lookup table, return a custom no-match message, and fill the formula through the worksheet.

  1. 1. Open a spreadsheet: Launch WPS Office and open an existing workbook or choose Spreadsheet from the home screen to create a new file.
  2. 2. Prepare the department data: Enter department values in one column and create a department-to-manager table in two adjacent columns.
  3. 3. Insert a matching formula: Click the output cell and use the formula bar to enter an XLOOKUP, VLOOKUP, nested IF, or IFS formula.
  4. 4. Fill the results: Press Enter and drag the fill handle down to apply the formula to the remaining rows.
Create maintainable department-to-manager lookup tablesUse IF, IFS, XLOOKUP, or VLOOKUP formulas for flexible matchingReturn a clear fallback when a department is not foundOpen and edit Microsoft Excel .xlsx files with strong format compatibility
microsoft office alternative - wps office

Frequently Asked Questions

Which formula is best for matching a department to a manager?

XLOOKUP with a separate department-to-manager table is usually the easiest to maintain. Use nested IF for a short, fixed list or VLOOKUP when XLOOKUP is unavailable.

How do I show text when no department matches?

Add "No Match" as the final XLOOKUP argument, as in =XLOOKUP(H2,DepartmentRange,ManagerRange,"No Match"). For VLOOKUP, wrap the formula in IFERROR, such as =IFERROR(VLOOKUP(H2,A2:B5,2,FALSE),"No Match").

Can I use IFS in WPS Spreadsheet?

Use IFS if your WPS Spreadsheet version supports the function. Add TRUE,"No Match" as the final condition and result to handle departments that are not listed.

Why does my lookup return the wrong manager?

Check that the department text matches exactly, that the lookup and return ranges have the same number of rows, and that VLOOKUP uses FALSE for an exact match.

How can I apply the manager formula to all rows?

Enter the formula in the first result cell, press Enter, then drag its fill handle down the column. Use relative references for each department row and absolute references for a fixed lookup table when needed.