Excel Data Validation List with Formula: How-To
In this article
To create a dropdown list in Excel from a formula, you use Data Validation with the List option and enter a formula that returns a range reference or an array of values. The formula can point to a named range, use OFFSET to create a dynamic list that expands automatically, or use INDIRECT to create dependent dropdowns. This guide walks you through each method with exact clicks and formulas, plus fixes for the most common errors.
What You'll Need
- Excel 2010 or later (desktop) — the steps below are for Windows and Mac desktop versions; Excel for the web has limited support for some formula-based validation.
- A worksheet with your source data (a list of items) and a separate cell where the dropdown will appear.
- Basic familiarity with cell references and named ranges.
Step-by-Step
- Set up your source list. Enter the items you want in the dropdown in a single column or row, with no blank cells. For example, put your list in cells A2:A10 on a sheet named “Lists”.
- Create a named range (optional but recommended). Select the list cells, then go to Formulas > Define Name. In the New Name dialog, type a name such as
MyList, confirm the “Refers to” box shows=Lists!$A$2:$A$10, and click OK. Named ranges make formulas easier to read and maintain. - Select the cell(s) where you want the dropdown. Click the cell, or drag to select a range of cells. This is where the validation will apply.
- Open Data Validation. Go to the Data tab, then click Data Validation (in the Data Tools group). The Data Validation dialog opens.
- Choose the List option. On the Settings tab, under Allow, select List. The Source box appears.
- Enter your formula. In the Source box, type one of the following (without the quotes):
- For a static range:
=Lists!$A$2:$A$10or=MyListif you created a named range. - For a dynamic list that grows:
=OFFSET(Lists!$A$2,0,0,COUNTA(Lists!$A:$A)-1,1)— this assumes your list starts at A2 and has no blanks. - For a dependent dropdown: first create a named range for each category list, then use
=INDIRECT($B$1)where B1 contains the category name.
- For a static range:
- Check the “In-cell dropdown” box. Make sure it is ticked so the arrow appears next to the cell.
- Decide on error handling. On the Error Alert tab, choose whether to stop invalid entries (recommended) or allow them. You can also add an input message on the Input Message tab to guide users.
- Click OK. The dropdown should now appear when you select the cell. Test it by clicking the arrow and choosing an item.
- Copy the validation to other cells (if needed). Select the cell with validation, press Ctrl+C (Cmd+C on Mac), select the target cells, then use Paste Special > Validation. Alternatively, drag the fill handle to copy the validation along with the cell.
Common Mistakes
- Forgetting the equals sign. In the Source box, a formula must start with
=. If you type a range without it, Excel may treat it as a literal list of text. - Using a relative reference that shifts. If you copy the validation to other cells, relative references (like
A2:A10) will shift and may point to the wrong range. Use absolute references ($A$2:$A$10) or named ranges. - Leaving blank cells in the source list. Blank cells appear as empty entries in the dropdown. Use a dynamic formula with COUNTA or clean up the list.
- Not accounting for sheet names with spaces. If your sheet name contains spaces, wrap it in single quotes:
='My List'!$A$2:$A$10. - Using INDIRECT with a name that doesn’t exist. The INDIRECT function returns #REF! if the named range is missing or misspelled. Ensure the name in the cell exactly matches a defined name.
- Expecting dynamic arrays to work in all versions. Formulas like
=UNIQUE(A2:A10)in the Source box require Excel 365 or Excel 2021. Older versions will reject them.
Tips
- Use a Table (Insert > Table) for your source list. Then you can refer to the table column with structured references like
=Table1[Items], and the list expands automatically as you add rows. - For dependent dropdowns, name each list exactly as the category name (e.g., “Fruits”, “Vegetables”) and use
=INDIRECT($B$1)in the second dropdown. The first dropdown should contain the category names. - To avoid the “The Source currently evaluates to an error” message, test your formula in a cell first. It should return a range or an array of values.
- If you need to allow users to type values not in the list, go to the Error Alert tab and uncheck “Show error alert after invalid data is entered”.
- Keep the source list on the same sheet or a dedicated hidden sheet to avoid accidental edits. You can hide the sheet via right-click > Hide.
Troubleshooting
- Dropdown arrow doesn’t appear. Check that “In-cell dropdown” is ticked in the Data Validation dialog. Also ensure the cell is not formatted as Text or Protected.
- Error: “The Source currently evaluates to an error.” This means your formula is invalid. Common causes: missing equals sign, misspelled named range, or a reference to a closed workbook. Test the formula in a cell first.
- Dropdown shows old items after updating the list. If you used a static range, the dropdown won’t update. Switch to a dynamic formula (OFFSET/COUNTA or a Table reference) or manually update the range.
- INDIRECT returns #REF!. The named range doesn’t exist or the name in the cell has extra spaces. Check the Name Manager (Formulas > Name Manager) and ensure the cell value matches exactly.
- Validation doesn’t copy correctly. When copying, use Paste Special > Validation to copy only the validation rule, not the cell contents. Or drag the fill handle.
- Formula works in one cell but not another. Check for relative references that shift. Use absolute references or named ranges.
Frequently Asked Questions
Can I use a formula that returns a list from another sheet?
Yes, as long as the other sheet is in the same workbook. Use a reference like =Sheet2!$A$2:$A$10 or a named range that points to that sheet. The sheet does not need to be active.
Why does my dropdown show a blank entry?
Your source range includes blank cells. Either adjust the range to exclude blanks or use a dynamic formula that counts non-blank cells, such as =OFFSET($A$2,0,0,COUNTA($A:$A)-1,1).
Can I make the dropdown list update automatically when I add new items?
Yes, use a dynamic formula like OFFSET/COUNTA or refer to a Table column. Both expand automatically as you add data, provided there are no blank rows in between.
Does data validation with a formula work in Excel for the web?
Excel for the web supports basic list validation from a range, but some formula-based methods (like INDIRECT or OFFSET) may not work fully. For best results, use the desktop app.
How do I remove data validation?
Select the cell(s), go to Data > Data Validation, click “Clear All”, then OK. This removes the dropdown and any restrictions.
Can I use a formula to create a dropdown from a comma-separated list?
Yes, but you must type the items directly into the Source box separated by commas (e.g., Red,Green,Blue). A formula that returns a comma-separated string will not work; the Source box expects a range or an array constant.