How to Create an Excel Dropdown Based on Stock Quantity
Question details
The user wants to create a data validation dropdown list that dynamically hides items with zero inventory and only displays items with a stock quantity greater than zero.
- Product
- Excel / WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Managing inventory or selecting food items where out-of-stock items should not be selectable.
- Observed behavior
- The goal is to show items like 'Steak' with positive stock while hiding items like 'Chops' with zero stock in the dropdown.
Ensure your version of Excel or WPS Office supports dynamic array functions like FILTER, and organize your stock data into distinct columns for item names and quantities.
Use FILTER Function and Data Validation
Extract in-stock items using the FILTER function into a helper column, then reference the spilled range in Data Validation.
This method leverages dynamic arrays. By filtering out items with zero stock to a separate helper column, you can use the spilled range operator (#) to automatically update your dropdown list whenever stock quantities change.
Select a helper cell (e.g., D2 on your Stock sheet) where you want the filtered list to appear.
Type =FILTER(Stock!A2:A100, Stock!B2:B100>0, "") and press Enter. This extracts items from column A where the corresponding quantity in column B is greater than zero.
Select the cell where you want the dropdown to appear. Go to the 'Data' tab and click on 'Data Validation'.
In the Data Validation dialog, choose 'List' under the Allow dropdown. In the Source field, enter =Stock!$D$2# and click OK. The '#' symbol ensures the dropdown includes all dynamically spilled results.
Create Dynamic Dropdowns Easily in WPS Spreadsheet
WPS Spreadsheet fully supports dynamic array functions like FILTER and advanced data validation, allowing you to build dynamic stock selection dropdowns with ease.
- 1. Open your inventory sheet: Launch WPS Spreadsheet and open your stock or inventory workbook.
- 2. Use the FILTER function: In a helper column, input the =FILTER() formula to extract items with stock > 0.
- 3. Apply Data Validation: Navigate to Data > Data Validation, choose List, and reference your helper cell using the '#' operator.

Frequently Asked Questions
Why is my dropdown showing a #SPILL! error?
A #SPILL! error occurs if there is existing data blocking the FILTER function from outputting its full list of results. Clear the cells below your helper formula to resolve this.
Can I hide zero-stock items without using a helper column?
Currently, Excel and WPS Spreadsheet Data Validation Source fields do not accept dynamic array formulas like FILTER directly. You must use a helper column to generate the spilled range first before referencing it.
What does the '#' symbol mean in the validation source?
The '#' symbol is the spilled range operator. It tells the software to reference not just the specific cell, but the entire dynamic array of results generated by the formula in that cell.




