Use a Formula with an Excel Data Validation Drop-Down
Question details
Determine how to combine a drop-down list with formula-based control over permitted entries in Excel.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user wants a cell to offer a drop-down list while restricting entries according to a formula.
- Observed behavior
- The desired result is a drop-down whose permitted values follow a formula-based condition.
Decide whether you need a visible drop-down or an independent custom validation formula. A single Excel cell can have one data validation type, so a List rule and a separate Custom rule cannot both be applied to it.
Create a formula-driven validation list in Excel
Use a formula to build the permitted values in a helper range, then use that range as the drop-down source.
This example uses FILTER and a spilled range, available in Excel versions that support dynamic arrays. The formula controls the list contents; it is not a separate Custom validation rule.
In a worksheet, enter possible values in A2:A20 and their status in B2:B20. Mark permitted rows as Active.
In an empty cell such as D2, enter =FILTER(A2:A20,(B2:B20="Active")*(A2:A20<>""),""). Leave the cells below D2 clear so the results can spill.
Select the entry cell, such as F2, and open Data > Data Validation. On the Settings tab, set Allow to List, enter =$D$2# in Source, and make sure In-cell dropdown is selected.
In Data Validation, open the Error Alert tab, select Show error alert after invalid data is entered, and choose Stop. Click OK, then test F2 with a listed value and an unlisted value.

Use an Excel Custom validation formula without a drop-down
Use this option when an independent formula is more important than displaying a drop-down arrow.
Build a formula-backed validation list in WPS Spreadsheets
Use helper cells to calculate permitted entries, then use those cells as the source for a WPS Spreadsheets validation drop-down. Empty helper results may appear as blank list items.
- 1. Prepare the source data: Open the workbook in WPS Spreadsheets. Enter candidate values in C2:C10 and their status in B2:B10.
- 2. Calculate permitted values: In A2, enter =IF(B2="Active",C2,"") and fill the formula down through A10. Rows not marked Active return an empty result.
- 3. Create the list: Select the entry cell and open Data > Data Validation, which may be labeled Validity in some versions. Choose List, set the source to =$A$2:$A$10, and enable the in-cell drop-down if that option is available.
- 4. Set the alert and test: In the validation dialog, enable the error alert and choose Stop if available. Click OK, then test the drop-down and an unlisted entry; check for blank items from the helper range.

Frequently Asked Questions
Can I apply both List and Custom validation to the same Excel cell?
No. A cell has one data validation rule. To keep the drop-down, use a formula-driven source range with Allow set to List; to use an independent formula, choose Allow: Custom instead.
How do I stop users from typing a value that is not in the list?
Select the cell and open Data > Data Validation. On the Error Alert tab, enable the alert and choose Stop. Note that pasting or filling cells can bypass normal validation checks.
Why does the filtered drop-down show no usable values?
Check that at least one source row meets the FILTER condition and that the spill range below the formula is clear. The example formula returns an empty result when there are no matching rows.
What can I use if my Excel version does not support FILTER?
Create a helper range with formulas supported by your version, or maintain the permitted values in a separate range. Then select the entry cell and use Data > Data Validation > List to point to that range.




