• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Dynamic Dependent Data Validation

You are here: Home / Excel / Dynamic Dependent Data Validation
dynamic dependent data validation
August 26, 2021 by Mynda Treacy

Before we had the luxury of dynamic array functions, creating dependent data validation lists typically required using multiple tables and named ranges, as shown here. Setting them up was laborious, however now that we have dynamic array functions, creating dynamic dependent data validation lists is much easier.

dynamic dependent data validation

Note: this technique requires a Microsoft 365 license for access to dynamic array functions. If you don’t have 365, you can use this technique.

Watch the Video

Subscribe YouTube

Download Workbook

Enter your email address below to download the sample workbook.

By submitting your email address you agree that we can email you our Excel newsletter.
Please enter a valid email address.

Download the Excel Workbook and follow along. Note: This is a .xlsx file please ensure your browser doesn't change the file extension on download.

Dynamic Dependent Data Validation with Dynamic Arrays

In the table below called TblRegions I have a list of my countries and some of their regions:

Data validation list data

In cell H4 the UNIQUE function extracts a list of sorted country names which are transposed across the columns to form the headers for the region lists:

UNIQUE function extract primary list

The result of the formula in cell H4 also feeds the data validation list for the countries. Notice the use of the # sign in the Data Validation List cell reference: $H$4# This ensures the data validation list will pick up any new countries added to the TblRegions table.

insert data validation list

In cell H5 the FILTER function returns the list of regions for the country in row 4. I’ve wrapped it in the SORT function to ensure the list returned is sorted alphabetically.

FILTER function extract dependent list

Note: you cannot use the FILTER function directly in the data validation list Source field because this field requires a range as opposed to the array of values returned by FILTER.

The data validation list uses the XLOOKUP function to return the range containing the list of regions for the country selected in column B. Notice the use of absolute and relative referencing on the lookup column ‘B’ and the use of the # sign to return a dynamic range (watch video for specific instructions):

XLOOKUP function as data validation reference

With this approach any updates to the TblRegions will automatically be included in the data validation lists.

dynamic dependent data validation

More Excel Posts

excel templates

Where to Find Free Excel Templates

Where to find free Excel templates and how to create your own Excel templates. Using templates saves time and effort.
Easily Remove Password Protection from Excel Files

Easily Remove Excel Password Protection

How to remove Excel password protection when you’ve forgotten the password. Works for sheets, workbooks and read only files.
Import data from a picture to Excel

Import Data from a Picture to Excel

Import data from a picture to Excel. Works with pictures from a file or the clipboard and loads it to the spreadsheet.
excel online

5 Excel Online Features Better than Desktop

5 Excel Online Features Better than Desktop including searchable data validation, track changes, single line ribbon and more.

10 Common Excel Mistakes to Avoid

10 common Excel mistakes to avoid, including merge cells, external links, formatting entire rows/columns and more.
new Excel features

Cool New Features in Excel for Microsoft 365

Cool New Features in Excel for Microsoft 365 including the navigation pane, smooth scroling, unhide multiple sheets and more.
QAT

Excel Quick Access Toolbar

The Excel Quick Access Toolbar is not only a handy for your mouse, but it also enables some super easy keyboard shortcuts.

Share and Collaborate in Excel

Share and Collaborate in Excel just like Google Sheets! Show changes, custom views, threaded comments with @ mentions and more.
Workbook Protection

Excel Workbook Protection

Excel Workbook protection can prevent your users from breaking your reports while still allowing interaction with Slicers and refreshing.

Excel Custom Number Format Conditions

Custom number format conditions allow you to specify a different format based on the size of a number. Sample workbook to download
Category: Excel
Previous Post:try otherwise power query iferrorIFERROR in Power Query Using TRY OTHERWISE
Next Post:Cool New Features in Excel for Microsoft 365new Excel features

Reader Interactions

Comments

  1. Harshad Nizam

    June 20, 2022 at 3:20 am

    Dear Mam,
    With reference to your video on dependent data validation, i want to ask you a doubt. Since, no one is answering me for that.

    At the video 6min 24 second, you have selected Country as “UK” and Region as “Essex” and other two countries with its Region. Now my doubt or my question is, If I change “UK” to “USA”, then will the region automatically changes or the data validation list changes automatically to “AL” without clicking in region data validation. Beacuse normally it remains under same UK regions when we select Country as USA.
    Please support for my doubt and how to do this. Also, request you to suggest with your best excel courses in linkedin.
    Thanks and Regards,

    Reply
    • Mynda Treacy

      June 20, 2022 at 8:52 am

      Hi Harshad,

      The region does not automatically change if you choose a country that no longer matches the previously selected region. You must click in the region cell and choose a new region. The data validation list will be updated to show regions that match the now selected country. You can download the example file above and try it yourself and you’ll see.

      I don’t put my courses on LinkedIn. You can see my course options here.

      Mynda

      Reply
  2. J-R

    August 30, 2021 at 9:08 pm

    Hi
    for the first method,you can in the data validation box use =indirect(“country[Country]”). -> (“tableName[columnName]”)
    So you don’t need to set the named range.

    Reply
    • Mynda Treacy

      August 31, 2021 at 3:42 pm

      Yep, nice tip! Thanks for sharing. I tend to avoid INDIRECT because it’s volatile, but if used sparingly it’s fine.

      Reply
  3. Guenther Wagner

    August 26, 2021 at 10:57 pm

    Hello,

    if you enter another country, the “2nd” Dropdown list *does not expand*, so only the first dropdown is dynamic…. It still only refers to columns H to J in your example file, the new column (K) is not included….This is a waste of time and useless, please propose a solution where the “secondary” (or dependant() dropdowns for a 4th country also work!
    🙁

    Reply
    • Mynda Treacy

      August 31, 2021 at 4:03 pm

      Hi Guenther,

      To dynamically expand the regions for more countries, copy the FILTER function across more columns and use the ‘not found’ argument in FILTER to return blank with two double quotes, e.g.:
      =SORT(FILTER(TblRegions[Region],TblRegions[Country]=H4,””))

      Then modify the XLOOKUP to also include further columns e.g. if your FILTER formulas are in columns H:P your XLOOKUP would be:
      =XLOOKUP($B5,$H$4:$P$4,$H$5:$P$5)#

      Mynda

      Reply

Leave a Reply Cancel reply

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

Current ye@r *

Leave this field empty

Sidebar

More results...

Shopping Cart

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Subscribe to Our Newsletter

Receive weekly tutorials on Excel, Power Query, Power Pivot, Power BI and More.

We respect your email privacy

Guides and Resources

  • Excel Keyboard Shortcuts
  • Excel Functions
  • Excel Formulas
  • Excel Custom Number Formatting
  • ALT Codes
  • Pivot Tables
  • VLOOKUP
  • VBA
  • Excel Userforms
  • Free Downloads

239 Excel Keyboard Shortcuts

Download Free PDF

Free Webinars

Excel Dashboards Webinar

Watch our free webinars and learn to create Interactive Dashboard Reports in Excel or Power BI

Click Here to Watch Now
  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
 
  • About My Online Training Hub
  • Contact
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Copyright © 2023 · My Online Training Hub · All Rights Reserved

Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.

Download A Free Copy of 100 Excel Tips & Tricks

excel tips and tricks ebook

We respect your privacy. We won’t spam you.

x