Function Problems

Return a Value for Each Excel Drop-Down Selection

Kushani NimanthikaKushani Nimanthika Dec 2, 2026 869 views

Question details

The user needs an Excel drop-down selection to return the corresponding package weight or value.

Return a Value for Each Excel Drop-Down Selection
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user selects a package size from a data-validation list and wants its matching weight to appear automatically.
Observed behavior
The desired result is for a separate cell to display the value associated with the selected package size.
Before you start

Choose an area on the same worksheet for a two-column lookup table and a separate cell for the returned value. Format the package-size cells as text if Excel changes entries such as 6x1.

Solution 1Recommended

Link the drop-down to a lookup table

Use a list of package sizes for data validation and a lookup formula to return the matching weight.

1
Create the lookup table

Enter Package in A1 and Weight in B1. Enter 6x1 and 12 in A2:B2, 5x3 and 33 in A3:B3, and 12x1 and 25 in A4:B4.

2
Create the drop-down

Select D2, then choose Data > Data Validation. Under Allow, select List, enter =$A$2:$A$4 in Source, and click OK.

3
Add the lookup formula

Select E2 and enter =XLOOKUP(D2,$A$2:$A$4,$B$2:$B$4) to return the weight for the package selected in D2.

4
Test the selection

Open the drop-down in D2 and select 5x3. Cell E2 should display 33.

Link the drop-down to a lookup table
Using an older Excel version?: If XLOOKUP is unavailable, enter =VLOOKUP(D2,$A$2:$B$4,2,FALSE) in E2 instead.
Work with drop-down lists in WPS

Match drop-down selections to values in WPS Spreadsheet

Use data validation and VLOOKUP in WPS Spreadsheet to connect a package-size list to its corresponding weights.

  1. 1. Enter the lookup data: In WPS Spreadsheet, enter package sizes in A2:A4 and their corresponding weights in B2:B4.
  2. 2. Set up the list: Select D2 and open Data > Data Validation. Choose List and enter =$A$2:$A$4 as the source.
  3. 3. Return the matching value: Select E2 and enter =VLOOKUP(D2,$A$2:$B$4,2,FALSE).
  4. 4. Check the result: Choose a package size from the drop-down in D2 and confirm that E2 shows its matching weight.
Return a package weight when a drop-down selection changesOpen and edit Microsoft Excel XLSX filesUse familiar spreadsheet formulas and data-validation controls
microsoft office alternative - wps office

Frequently Asked Questions

Can the drop-down cell display the package name and its weight at the same time?

The data-validation cell displays the selected list item. Use a separate cell with a lookup formula to show the corresponding weight.

What can I use if my Excel version does not support XLOOKUP?

Enter =VLOOKUP(D2,$A$2:$B$4,2,FALSE) in the result cell. The package sizes must be in the first column of the lookup range.

Why does the lookup formula return an error?

Check that D2 contains a package size present in A2:A4 and that the entries match exactly. If D2 is empty, select an item from its drop-down list.

How do I add another package size to the drop-down?

Add the package and weight below the existing lookup table, then update the Source under Data > Data Validation and extend the ranges in the lookup formula to include the new row.