SOLVED

Dependent Data Validation with Dynamic Range

%3CLINGO-SUB%20id%3D%22lingo-sub-2523847%22%20slang%3D%22en-US%22%3EDependent%20Data%20Validation%20with%20Dynamic%20Range%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2523847%22%20slang%3D%22en-US%22%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3EUsing%20Excel%20365%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3EHi%2C%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3EFirst%2C%20thanks%20in%20advance%20for%20the%20help%2C%20and%20sorry%20for%20the%20long%20post.%20I%20am%20currently%20creating%20a%20document%20using%20dependent%20data%20validation.%20I%20have%20three%20categories%20of%20data%20that%20I%20am%20using.%20For%20this%20purpose%20let's%20say%20the%20first%20(header)%20category%20is%20countries%2C%20and%20the%20dependent%20category%20is%20cities.%20The%20last%20element%20is%20a%20large%20datasheet%20to%20find%20which%20cities%20should%20be%20included%20out%20of%20the%20given%20city%20list%20to%20make%20sure%20the%20data%20validation%20options%20aren't%20infinitely%20long%2C%20and%20also%20has%20information%20about%20the%20city%20that%20the%20validation%20spits%20out.%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3EInitially%2C%20the%20sheet%20worked%20fine%20using%20name%20manager%20to%20name%20the%20array%20of%20each%20country's%20cities%20(which%20were%20not%20formula%20reliant)%20and%20then%20using%20the%20indirect%20function%20for%20the%20second%20data%20validation.%20However%2C%20now%20I%20am%20trying%20to%20make%20the%20sheet%20extremely%20easy%20to%20update%20because%20the%20list%20of%20applicable%20cities%20in%20each%20country%20is%20going%20to%20be%20changing.%20I%20want%20to%20be%20able%20to%20download%20that%20list%20of%20cities%20and%20drop%20it%20directly%20into%20my%20sheet.%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3EWhere%20I'm%20at%20currently%20is%20first%2C%20using%20the%20filter%20equation%20to%20sort%20the%20cities%20to%20each%20country%2C%20second%20using%20an%20Xlookup%20to%20see%20if%20the%20city%20is%20also%20present%20in%20the%20large%20dataset%2C%20and%20finally%2C%20a%20final%20filter%20equation%20to%20remove%20blanks%20from%20the%20Xlookup.%20At%20this%20point%2C%20I%20have%20a%20list%20of%20all%20the%20cities%20appropriated%20cleaned%20and%20sorted%20(both%20using%20an%20IF%20equation%20and%20Filter%20equation%20to%20see%20if%20that%20made%20a%20difference).%20However%2C%20I%20cannot%20figure%20out%20how%20to%20get%20these%20ranges%20to%20work%20in%20the%20data%20validation%2C%20noting%20that%20they%20are%20dynamic%20and%20will%20automatically%20be%20changing%20length.%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3EWhat%20I've%20tried%3A%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3E-%20Using%20an%20offset%20equation%20to%20name%20the%20range%20(the%20indirect%20equation%20in%20the%20validation%20does%20not%20seem%20to%20recognize%20this)%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3E-%20creating%20a%20table%20for%20each%20country%20(this%20does%20not%20correctly%20auto-lengthen%20when%20I%20do%20it%2C%20possibly%20because%20of%20the%20equation%20I'm%20using%20to%20clean%20it%3F%20I'm%20not%20sure--%20have%20tried%20with%20the%20data%20originating%20from%20%3Dfilter%20and%20%3Dif.%20Also%20when%20trying%20to%20sort%20out%20blanks%20it%20shortens%20the%20entire%20sheet%20not%20just%20the%20specific%20table)%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22_1qeIAgB0cPwnLhDF9XSiJM%22%3EIf%20anyone%20has%20tips%20or%20needs%20any%20clarification%20on%20how%20to%20make%20the%20dynamic%20ranges%2C%20I%20would%20hugely%20appreciate%20it.%20Thanks%20again!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2523847%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2523937%22%20slang%3D%22en-US%22%3ERe%3A%20Dependent%20Data%20Validation%20with%20Dynamic%20Range%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2523937%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1097832%22%20target%3D%22_blank%22%3E%40dhazan29%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20don't%20need%20offset%2C%20it%20could%20be%20like%20this%20(just%20an%20idea)%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20829px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F294058i1E4EEADD8D6B73EC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2524432%22%20slang%3D%22en-US%22%3ERe%3A%20Dependent%20Data%20Validation%20with%20Dynamic%20Range%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2524432%22%20slang%3D%22en-US%22%3EThank%20you%20so%20much!!%3C%2FLINGO-BODY%3E
New Contributor

Using Excel 365

 

Hi,

First, thanks in advance for the help, and sorry for the long post. I am currently creating a document using dependent data validation. I have three categories of data that I am using. For this purpose let's say the first (header) category is countries, and the dependent category is cities. The last element is a large datasheet to find which cities should be included out of the given city list to make sure the data validation options aren't infinitely long, and also has information about the city that the validation spits out.

 

Initially, the sheet worked fine using name manager to name the array of each country's cities (which were not formula reliant) and then using the indirect function for the second data validation. However, now I am trying to make the sheet extremely easy to update because the list of applicable cities in each country is going to be changing. I want to be able to download that list of cities and drop it directly into my sheet.

 

Where I'm at currently is first, using the filter equation to sort the cities to each country, second using an Xlookup to see if the city is also present in the large dataset, and finally, a final filter equation to remove blanks from the Xlookup. At this point, I have a list of all the cities appropriated cleaned and sorted (both using an IF equation and Filter equation to see if that made a difference). However, I cannot figure out how to get these ranges to work in the data validation, noting that they are dynamic and will automatically be changing length.

 

What I've tried:

- Using an offset equation to name the range (the indirect equation in the validation does not seem to recognize this)

- creating a table for each country (this does not correctly auto-lengthen when I do it, possibly because of the equation I'm using to clean it? I'm not sure-- have tried with the data originating from =filter and =if. Also when trying to sort out blanks it shortens the entire sheet not just the specific table)

 

If anyone has tips or needs any clarification on how to make the dynamic ranges, I would hugely appreciate it. Thanks again!

3 Replies
best response confirmed by dhazan29 (New Contributor)
Solution

@dhazan29 

You don't need offset, it could be like this (just an idea)

image.png

Thank you so much!!

@dhazan29 

You are welcome