Function Problems

How to Sum Personnel for Multiple Drop-Down Selections in Excel

Olivia MillerOlivia Miller Nov 10, 2026 869 views

Question details

The user needs to calculate the total personnel count by summing values for multiple office locations that are selected within a single cell, separated by commas.

How to Sum Values for Multiple Drop-Down Selections in a Single Cell
Product
Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Working with data where a single cell contains multiple comma-separated values from a drop-down list (e.g., "Austin, Tampa"), and a total sum needs to be calculated based on a separate reference table.
Observed behavior
The user wants to dynamically look up and sum the numerical values for all the text items listed within the same cell string without manually parsing them.
Before you start

Ensure your reference table is properly formatted (e.g., as an Excel Table named "Office") and that the delimiter used in your drop-down selections matches the one in your formula exactly.

Solution 1Recommended

Use SUM, XLOOKUP, and TEXTSPLIT Functions

This method uses dynamic array functions to split the comma-separated string, look up each individual value, and sum the total in one go. It is ideal for Excel 365 and modern spreadsheet software.

This approach leverages the TEXTSPLIT function to turn the single-cell string into an array of individual items. XLOOKUP then finds each item in the reference table, and SUM adds up the returned values.

1
Select destination cell

Click on the cell where you want to display the total personnel sum for the selected allocations.

2
Enter the formula

Type the following formula into the formula bar: =SUM(XLOOKUP(TEXTSPLIT([@Allocations],", "),Office[Office],Office[# of Personnel],0))

3
Apply the formula

Press Enter. The TEXTSPLIT function will separate the combined locations (e.g., "Austin, Tampa") using the comma and space delimiter.

4
Review the lookup process

XLOOKUP evaluates each separated location against the Office[Office] column and returns the corresponding personnel counts, which are then immediately totaled by the SUM function.

Use SUM, XLOOKUP, and TEXTSPLIT Functions
Tip: The '0' at the end of the XLOOKUP function ensures that if an office is not found in the reference table, the formula returns 0 instead of an #N/A error, keeping your sum intact.

Easily Calculate Multiple Criteria Values with WPS Spreadsheet

WPS Spreadsheet offers a powerful, user-friendly environment for managing complex data tables and formulas. With support for advanced lookup features and array formulas, summarizing data from multiple drop-down selections is seamless and fast.

  1. 1. Open your data: Launch WPS Spreadsheet and open the workbook containing your drop-down selections and reference table.
  2. 2. Format reference data: Ensure your reference data is properly organized with clear column headers for the lookup values and the return values.
  3. 3. Input the array formula: Select the output cell and type the SUM and XLOOKUP combination formula directly into the formula bar.
  4. 4. Get instant results: Press Enter to instantly view your aggregated total for the combined selections across your dataset.
Fully compatible with Microsoft Excel file formats (.xlsx) and modern array formulas.Includes a vast library of functions for advanced data analysis and manipulation.Lightweight software that runs smoothly on various devices without lag.Intuitive interface making table references and formula building easier for beginners.
microsoft office alternative - wps office

Frequently Asked Questions

Why am I getting a #NAME? error when using TEXTSPLIT?

The #NAME? error occurs if your version of Excel or spreadsheet software does not support the TEXTSPLIT function, which was introduced in newer versions like Microsoft 365. If you are on an older version, consider using the SUMPRODUCT and SEARCH alternative method provided in this guide.

How do I handle cells that use just a comma without a space as a delimiter?

You need to adjust the delimiter argument in the TEXTSPLIT function. Change the ", " (comma and space) to "," (just a comma) in your formula so it matches the exact formatting used in your drop-down cell.

What happens if an office name in the drop-down is not found in the reference table?

The formula provided includes 0 as the fourth argument of the XLOOKUP function, which stands for the 'if_not_found' parameter. If a selected office is missing from the reference table, XLOOKUP will safely return 0, ensuring the SUM function still works without returning an error.