Function Problems

How to Use a Drop-Down List to Populate Nutrition Values in WPS Office Spreadsheets

Nimra MalikNimra Malik Nov 13, 2026 869 views

Question details

The user needs to create a meal-selection drop-down that automatically returns calories, protein, carbohydrates, and other nutrition values in adjacent columns using XLOOKUP.

How to Use a Drop-Down List to Populate Nutrition Values in WPS Office Spreadsheets
Product
WPS Office Spreadsheets
Device & OS
not provided
Scenario
The user is setting up a meal-planning or nutrition-tracking spreadsheet and wants to select a meal from a drop-down and have the related nutrition data fill automatically.
Observed behavior
The selected meal should return the corresponding nutrition values in adjacent cells without manually copying or looking up each value.
Before you start

Organize the meal and nutrition data in a structured Excel Table, and confirm that your WPS Office version supports XLOOKUP and dynamic array spill results.

Solution 1Recommended

Create a Data Validation Drop-Down and Use XLOOKUP to Return Adjacent Nutrition Values

Use this method when you want one meal selection to automatically fill calories, protein, carbohydrates, and fat in neighboring cells.

This approach uses an Excel Table for structured references and XLOOKUP's multi-column return array. When dynamic arrays are enabled, the formula spills across adjacent columns automatically.

1
Convert meal data to an Excel Table

Select the range containing the meal names and nutrition values, click Insert > Table, confirm the range, and rename the table to Meals in the Table Design tab.

2
Create the meal drop-down list

Select the cell where the meal will be chosen, such as A2, click Data > Data Validation, choose List under Allow, and enter =Meals[Meal] as the source.

3
Enter the XLOOKUP formula

In the first adjacent cell, such as B2, enter =XLOOKUP(A2,Meals[Meal],Meals[[Calories]:[Fat]],"Not found") and press Enter.

4
Verify the automatic spill result

Check that the formula returns all nutrition columns in adjacent cells and that no other data is blocking the spill range.

Result: When the meal in A2 changes, the adjacent nutrition cells update automatically.
WPS Spreadsheets how-to

Build a Meal Nutrition Drop-Down in WPS Office Spreadsheets

Use WPS Office Spreadsheets to create the same data validation and XLOOKUP workflow for meal nutrition tracking, with an Excel-compatible interface and full .xlsx support.

  1. 1. Install WPS Office: Download WPS Office from the official site, install it, and open WPS Spreadsheets.
  2. 2. Prepare the nutrition table: Enter meal names and nutrition columns, select the range, and click Insert > Table.
  3. 3. Add the drop-down and formula: Click Data > Data Validation to create the meal list, then enter the XLOOKUP formula in the adjacent cell.
  4. 4. Save in Excel format: Click Menu > Save As and choose .xlsx to keep the workbook compatible with Microsoft Excel.
Returns multiple nutrition values with XLOOKUP and dynamic arraysUses Excel .xlsx formatting for smooth file sharing and compatibilityFree and lightweight spreadsheet editor for everyday meal planningFamiliar ribbon tools for Data Validation, Tables, and formulas
microsoft office alternative - wps office

Frequently Asked Questions

Does XLOOKUP work in WPS Office Spreadsheets?

Yes, current WPS Office versions include XLOOKUP. If your version does not support it, use INDEX and MATCH to return the matching nutrition row or column.

Why does my XLOOKUP result show #SPILL?

Make sure the cells to the right of the formula are empty and that the return_array includes the full nutrition range, because XLOOKUP cannot spill into occupied cells.

Can I return only calories instead of all nutrition values?

Yes, replace the multi-column return array with a single column such as Meals[Calories]: =XLOOKUP(A2,Meals[Meal],Meals[Calories],"Not found").

How do I add a new meal to the drop-down list?

Add the new meal and its nutrition data as a new row in the Excel Table. Because the validation source uses Meals[Meal], the list expands automatically.