Quick, clean, and to the point

Data validation with conditional list

Excel formula: Data validation with conditional list
Generic formula 
=IF(A1="See full list",long_list,short_list)

To allow a user to switch between two or more lists, you can use the IF function to test for a value and conditionally return a list of values based on the result. In the example shown, the data validation applied to C4 is:

=IF(C4="See full list",long_list,short_list)

This allows a user to select a city from a short list of options by default, but also provides an easy way to view and select a city from a longer list of cities.

Note: I ran into this formula and approach on the excellent Chandoo site.

How this formula works

Data validation rules are triggered when a user adds or changes a cell value. This formula takes advantage of this behavior to provide a clever way for the user to switch between a short list of cities and a longer list of cities.

In this formula, the IF function is configured to test the value in cell C4. When C4 is empty or contains any value except "See full list", the user sees a short list of cities, provided in the named range short_list (E6:E13):

data validation with conditional lis default short list

If the value in C4 is "See full list", the user sees the long list of cities, provided in the named range long_list (G6:G35):

data validation with conditional lis optional long list

The named ranges used in the formula are not required, but they make the formula a lot easier to read and understand. If you are new to named ranges, this page provides a good overview.

Dependent dropdown lists

Expanding on the example above, you can create multiple dependent dropdown lists. For example, a user selects an item type of "fruit", so they next see a list of fruits to select. If they first select "vegetable" they then see a list of vegetables. Click the image below for instructions and examples:

dependent dropdown list example

Dave Bruns

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

Excel foundational video course
Excel Pivot Table video training course
Excel formulas and functions video training course
Excel Shortcuts Video Course
Excel Charts video training course
Video training for Excel Tables