Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to get last column number in range in Excel
  • How to get last row in numeric data in Excel
  • Last row number in range
  • How to retrieve first match between two ranges in Excel
  • How to get relative row numbers in a range in Excel

Data Analysis Examples

  • What-If Analysis: Scenarios and Goal Seek in Excel
  • How To Filter Data in Excel
  • How to add Trendline to a chart in Excel
  • Everything about Charts in Excel
  • How to Create Area Chart in Excel

Data Validation Examples

  • Excel Data validation don’t exceed total
  • Data validation must not exist in list
  • Excel Data validation must begin with
  • Excel Data validation require unique number
  • Excel Data validation no punctuation

Excel Data validation with conditional list

by

How to create a drop-down and multiple dependent drop-down lists.in Excel

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.

Formula

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

Explanation

In the example shown above, 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.

Worked Example:   Sum bottom n values with criteria in Excel

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):

Worked Example:   Calculate number of hours between two times in Excel

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):

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.

Worked Example:   Example of Count with Or Criteria in Excel

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.

 

 

 

Post navigation

Previous Post:

Excel Data validation must begin with

Next Post:

Excel Data validation must contain specific text

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • ASC function: Description, Usage, Syntax, Examples and Explanation
  • How to get first word in Excel
  • FIXED function: Description, Usage, Syntax, Examples and Explanation
  • How to extract multiple lines from a cell in Excel
  • How to strip protocol and trailing slash from URL in Excel
  • Get month name from date in Excel
  • Display Days until expiration date in Excel
  • Add months to date in Excel
  • Next biweekly payday from date in Excel
  • Get project end date in Excel
  • TBILLEQ function: Description, Usage, Syntax, Examples and Explanation
  • TBILLYIELD function: Description, Usage, Syntax, Examples and Explanation
  • ODDLPRICE function: Description, Usage, Syntax, Examples and Explanation
  • COUPDAYSNC function: Description, Usage, Syntax, Examples and Explanation
  • YIELD function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2021 xlsoffice. All Rights Reserved | Teal Smiles