Yes. In Excel for Microsoft 365 on Windows, an if-then list is usually a dependent dropdown: the choice in one cell determines the options in another. If the first dropdown is in A2 and each category matches a named range—with spaces changed to underscores—set the second dropdown’s Data Validation source to =INDIRECT(SUBSTITUTE($A2," ","_")).
What an if-then list means in Excel
Excel does not have a separate feature called an “if-then list.” The phrase usually means a dependent dropdown list: if a user chooses one category, then Excel offers the related choices in the next cell. For example, selecting “Fruit” could make the next dropdown show Apple, Pear, and Peach, while selecting “Drinks” shows Tea, Coffee, and Water.
These lists are useful in order forms, surveys, inventory sheets, and other workbooks where a long list of every possible answer would be inconvenient. They also reduce inconsistent entries: users choose from prepared options rather than typing category names in different ways. The dependency is between cells, not an automatic rule that rewrites the second cell’s value.
The standard approach uses Excel’s Data Validation list setting and defined names for the individual option lists. A formula in the validation rule translates the first cell’s selection into the name of the appropriate list.
Arrange the source lists
Start with a source sheet, such as a worksheet named Lists. Put each category’s options in its own column, with a clear heading at the top. For instance, place the heading Fruit in B1 and its options in B2:B4; place Drinks in C1 and its options in C2:C4. Keep the headings and list contents simple and consistent.
Next, define a named range for each set of options. Select the options under Fruit, not the heading, then choose Formulas > Define Name. Give that range the name Fruit. Repeat for each category and use the corresponding heading as its range name. Names cannot contain spaces, so a heading such as Hot Drinks needs a name such as Hot_Drinks. Excel names also cannot be written like cell references, so avoid category names such as B2.
- Use the same spelling and spacing in the category dropdown and the named-range convention.
- Exclude headings from the option ranges so they do not appear as choices.
- Keep each named range limited to the options you want users to see.
- For labels with punctuation or more complicated wording, use a separate mapping approach rather than assuming the label can be converted by replacing spaces alone.
Defined names are particularly convenient when source lists live on another worksheet. Excel’s Data Validation source field does not accept every direct cross-sheet range reference, but a defined name gives the validation rule a usable reference.
Create the first dropdown
Make a range containing the category labels, such as Fruit and Drinks, and define that range with the name Categories. On the worksheet where people will enter data, select the cell for the first choice, such as A2. Choose Data > Data Validation. In the Settings tab, set Allow to List, enter the named range as the source, and select OK.
With the category labels stored in a named range called Categories, the source for this first dropdown is =Categories. The resulting dropdown shows the labels in that range; it does not show the item names from the other named ranges. If you want a dropdown arrow visible when the cell is selected, leave the in-cell dropdown option enabled in the validation dialog.
To make the same category dropdown available in several rows, select the intended input cells before applying validation, or copy the validated cell to the other rows. Check that the source range contains only the category labels and not extra blank cells, unless blank entries are deliberately part of the design.
Add the dependent dropdown
Select the cell beside the first dropdown, such as B2, and open Data > Data Validation. Choose List for Allow. With the category selection in A2 and named ranges such as Fruit and Drinks already created, enter =INDIRECT(SUBSTITUTE($A2," ","_")) in the Source box. Here, the first cell contains the category label and the named ranges use underscores wherever that label has spaces.
SUBSTITUTE changes spaces in the selected label to underscores. INDIRECT then interprets the resulting text as a reference to a named range. If A2 contains Hot Drinks, the formula looks for the name Hot_Drinks. The child dropdown therefore presents the contents of that range. The dollar sign fixes the column reference to A while leaving the row relative, which is helpful when applying the rule down a worksheet.
INDIRECT is a common solution, but it depends on the text matching a real defined name. A spelling difference, an unsupported character, or a missing named range can cause the child list to fail. If your category labels do not map neatly to valid range names, use clear short keys for the names or consider the helper-list method below.
Apply the rule to multiple rows
For a table where each row has its own category and item, apply the dependent rule to the item cells in one operation. Select B2:B100, for example, and create the validation rule using the formula for the top cell, A2. Because the row number is relative, Excel can use A3 for the next row, A4 for the one after that, and so on. The column stays A because it is written with a dollar sign.
Alternatively, set up the rule in B2 first and copy that cell down. When copying, check a few rows to confirm that each item dropdown is responding to the category in its own row. If you accidentally lock both the column and row, every child dropdown may keep looking at A2, regardless of which row it is in.
For maintainable workbooks, keep source lists together on a clearly named sheet and make it obvious which cells users should edit. If lists change often, extend the named ranges when new options are added; a named range that ends at row 10 will not include a new entry typed in row 11 unless the range is expanded.
Alternative: build the choices with a helper formula
Named ranges work well when there are a manageable number of categories and stable lists. A different option is to keep the source data in two columns—category in A and item in B—and use FILTER to extract the matching items. This can be useful when the source list is long or changes frequently. FILTER is available in Microsoft 365 and Excel 2021 or later.
Assume the source table is on Lists, with categories in A2:A20 and corresponding items in B2:B20. On the entry sheet, A2 contains the selected category and H2 is an otherwise empty helper area. Enter =TRANSPOSE(FILTER(Lists!$B$2:$B$20,Lists!$A$2:$A$20=$A2,"")) in H2. It returns the matching items across the row, starting in H2. Leave enough cells to the right empty for the results to spill.
Then set the validation source for B2 to =H2#. The # refers to the full spilled result that starts in H2. For additional entry rows, put a corresponding helper formula in each row and point that row’s validation rule to its own spill range. Keep helper cells out of the way, perhaps on a separate sheet, and test the setup in the Excel version used by the people filling in the workbook. Dynamic-array behavior is not available in older Excel versions.
This method avoids creating one defined name per category, but it needs helper cells and a formula for each active row. It also requires the spill area to remain clear. Do not place other values in cells where the returned options need to spill, or Excel may show a spill error and the dropdown source will not work as intended.
Important limits and maintenance
A dependent dropdown controls choices offered when a user opens the list; it does not automatically erase a previous choice. If someone selects Fruit in A2, chooses Apple in B2, and later changes A2 to Drinks, B2 can still contain Apple. That value is now inconsistent with the category even though the dropdown offers drink choices when opened.
For a simple workbook, explain that users should reselect the dependent value after changing its parent. In a more controlled process, add a separate check that flags mismatched entries, or use a carefully designed automation solution. Data Validation alone is not a cascading reset system.
Validation is also not a security boundary. Users can sometimes introduce values through pasting, filling, or other edits that do not behave like selecting an item from the dropdown. To check existing entries, select the relevant cells and use Data > Data Validation > Circle Invalid Data, where available in the desktop app. Review the workbook after importing or pasting data rather than assuming every cell has been checked.
For rules that must be enforced more strictly, protect the sheet appropriately and build a review process for imported data. Protection can reduce accidental edits, but it should not be treated as a replacement for checking the values your process receives.
Common problems and fixes
- The child dropdown is empty: Check that the parent cell exactly matches a category key and that a named range with the expected name exists. Confirm that the named range includes actual items and does not point at blank cells.
- Categories contain spaces: The example formula replaces spaces with underscores. It does not automatically remove hyphens, punctuation, or other characters. Make the names match, or use a mapping table or helper formula.
- The dropdown always uses the first row: Check the reference in the validation rule. For a rule applied down column B, the parent row should change while the parent column remains fixed.
- A new option is missing: Expand the relevant named range or use a source range that includes the new entry. Confirm that the entry is inside the range, not merely typed below it.
- The old child choice remains after the parent changes: This is expected. Data Validation offers a new list but does not clear the existing cell value.
When diagnosing a problem, first test one parent-child pair with two short lists. This makes it easier to separate a naming issue from a copied-reference issue or a source-range issue. Once the small example works, extend the rule to the full input area.
When to use each method
Choose named ranges with INDIRECT when category names are stable, each group has its own list, and you want a familiar setup without helper formulas. It is straightforward to inspect: each category corresponds to a defined name, and the validation formula points to the matching one. The tradeoff is the need to keep names aligned with labels and update ranges when lists grow.
Choose a FILTER helper when categories and items are kept in a single two-column source table, lists change regularly, and the workbook uses a compatible Excel version. This avoids maintaining many separate named ranges, but it adds formulas and spill areas that need space. If the workbook will be opened in older Excel editions or a range of spreadsheet programs, test the workbook in those environments before relying on dynamic arrays.
On Excel for Mac, the core Data Validation and defined-name workflow is similar, although dialog and ribbon presentation can vary by release. Excel for the web may expose list validation and many workbook features, but behavior and editing options can differ from the Windows desktop app. For a workbook shared across platforms, verify both the dropdowns and the named ranges in the versions your users actually have.
Frequently Asked Questions
Can I make a dropdown depend on another dropdown in Excel?
Yes. Create a list for the first dropdown, create a corresponding named range for each group of options, then use a validation source formula that refers to the selected group. The second dropdown will offer that group’s options.
Does changing the first dropdown clear the second cell?
No. Data Validation changes the available choices but does not erase a value already in the dependent cell. The user must choose a new value, or you must add a separate check or automation to handle the old entry.
Can I use category names with spaces?
Yes, if you map them consistently. For example, use a named range with an underscore in place of a space and use a formula that makes the same replacement. Other punctuation may need a separate mapping strategy.
Why does my dependent list show no choices?
Usually the selected category does not resolve to a valid named range, or the range is empty or incorrect. Check spelling, the name in Formulas > Name Manager, and the range’s start and end cells.
Can I use a dependent dropdown with a long source table?
Yes. A helper formula using FILTER can extract options from a category-and-item table, with its spilled results used as the validation source. This approach requires a version with dynamic-array support and enough empty space for the results.
Related
- Excel Row Limit: How Many Rows Can a Worksheet Hold?
- Excel Max Row Limit: Rows, Columns, and Workarounds
- Excel Day Today: Find Today’s Date and Day Number
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- VLOOKUP Examples for Multiple Sheets in ExcelTo look up a value on another worksheet, use VLOOKUP with that sheet’s range, such as =VLOOKUP(A2,Products!$A$2:$C$100,2,FALSE). To…
- Excel INDEX Function Examples for Everyday LookupsExcel’s INDEX function returns the value at a specified row and column within a range. For example, with…
- Calculate Age in Excel in Years with Simple FormulasTo calculate completed age in years in Excel, put each birth date in column A and, with the…
- SUMIF Excel Shortcut: The Fastest Way to Use ItExcel has no dedicated keyboard shortcut that inserts a SUMIF formula automatically. The quickest method is to type…
- RANK Excel Function: Examples, Ties, and Sort OrderTo rank a value in Excel, use RANK.EQ(number,ref,[order]): for example, with scores in B2:B6, =RANK.EQ(B2,$B$2:$B$6,0) returns B2’s position…
- Excel Formula for Number of Years From a Date, ExplainedTo calculate completed years from a date in Excel, use =DATEDIF(A2,TODAY(),"Y"), where A2 contains the starting date. For…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.