SOLVED

Dynamic, Horizontal Named Ranges for Use in Dependent Drop-Down Lists

%3CLINGO-SUB%20id%3D%22lingo-sub-3129723%22%20slang%3D%22en-US%22%3EDynamic%2C%20Horizontal%20Named%20Ranges%20for%20Use%20in%20Dependent%20Drop-Down%20Lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3129723%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20folks%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20been%20having%20some%20trouble%20with%20using%20a%20dynamic%2C%20horizontal%20named%20range%20in%20a%20dependent%20drop-down%20list.%20My%20situation%20is%20the%20following%3A%20I%20am%20doing%20up%20a%20budget%20for%20myself%20and%20listing%20the%20name%20and%20location%20of%20each%20merchant.%20Some%20merchants%20are%20visited%20at%20multiple%20locations%20(e.g.%20McDonald's).%20I%20have%20been%20able%20to%20set%20up%20a%20drop-down%20to%20select%20from%20a%20list%20of%20merchants%20that%20I%20have%20previously%20visited.%20However%2C%20I%20have%20not%20been%20able%20to%20set%20up%20a%20drop-down%20to%20select%20the%20locations%20that%20I%20have%20previously%20entered%20for%20those%20merchants.%20The%20following%20table%20is%20an%20example%20of%20what%20my%20work%20looks%20like.%3C%2FP%3E%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSTRONG%3EMerchant%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSTRONG%3ELocation%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSTRONG%3EWithdrawal%3C%2FSTRONG%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CFONT%20color%3D%22%23CF3600%22%3EMerchant%20A%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20color%3D%22%23CF3600%22%3ELocation%20A1%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%245%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CFONT%20color%3D%22%23CF3600%22%3EMerchant%20A%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CFONT%20color%3D%22%23CF3600%22%3ELocation%20A2%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%2410%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CFONT%20color%3D%22%23008000%22%3EMerchant%20B%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CFONT%20color%3D%22%23008000%22%3ELocation%20B1%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%2420%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CFONT%20color%3D%22%23CF3600%22%3EMerchant%20A%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CFONT%20color%3D%22%23CF3600%22%3ELocation%20A1%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%2415%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CFONT%20color%3D%22%23008000%22%3EMe%3CFONT%20color%3D%22%23007A4B%22%3Erchant%20B%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20color%3D%22%23008000%22%3ELocation%20B2%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%2410%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CFONT%20color%3D%22%232356EF%22%3EMerchant%20C%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CFONT%20color%3D%22%232356EF%22%3ELocation%20C1%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%245%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CFONT%20color%3D%22%23CF3600%22%3EMerchant%20A%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CFONT%20color%3D%22%23CF3600%22%3ELocation%20A2%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%2233.333333333333336%25%22%3E%2420%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3EI%20have%20text%20tables%20on%20a%20separate%20worksheet%20listing%20the%20unique%20and%20distinct%20merchants%2C%20and%20their%20associated%20unique%20and%20distinct%20locations%20as%20dynamic%2C%20horizontal%20named%20ranges%20so%20that%20they%20can%20accommodate%20new%20locations%20automatically.%20In%20the%20above%20table%2C%20I%20use%20an%20in-cell%20drop-down%20in%20the%20Merchant%20column%20to%20select%20between%20Merchants%20%3CFONT%20color%3D%22%23CF3600%22%3EA%3C%2FFONT%3E%2C%20%3CFONT%20color%3D%22%23007A4B%22%3EB%3C%2FFONT%3E%2C%20or%20%3CFONT%20color%3D%22%230000FF%22%3EC%3C%2FFONT%3E.%20Once%20I%20have%20selected%20a%20merchant%2C%20the%20associated%20dependent%20drop-down%20in%20the%20Location%20column%20allows%20me%20to%20select%20from%20any%20of%20the%20locations%20for%20that%20merchant.%20E.g.%2C%20If%20I%20select%20Merchant%20%3CFONT%20color%3D%22%23CF3600%22%3EA%3C%2FFONT%3E%20from%20the%20drop-down%20to%20enter%20a%20transaction%20for%2C%20I%20can%20then%20use%20a%20drop-down%20in%20the%20Location%20column%20to%20select%20from%20Locations%20%3CFONT%20color%3D%22%23CF3600%22%3EA1%3C%2FFONT%3E%2C%20%3CFONT%20color%3D%22%23CF3600%22%3EA2%3C%2FFONT%3E%2C%20or%20%3CFONT%20color%3D%22%23CF3600%22%3EA3%3C%2FFONT%3E.%20My%20problem%20is%20the%20second%20part%20of%20that%20process%3B%20I%20just%20can't%20get%20the%20horizontal%20named%20range%20to%20display%20as%20a%20drop-down.%20Currently%2C%20based%20on%20this%20example%2C%20I%20am%20using%20the%20formula%3A%20%3DOFFSET(%3CEM%3Efirst_cell_of_named_range%2C%26nbsp%3B%3C%2FEM%3E0%2C%200%2C%201%2C%20COUNTA(%3CEM%3Erow_number_of_named_range%3C%2FEM%3E%3A%3CEM%3Erow_number_of_named_range%3C%2FEM%3E))%20I've%20tried%20with%20and%20without%20absolute%20references%2C%20too.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWould%20anyone%20be%20able%20to%20provide%20any%20help%3F%20It's%20really%20been%20bugging%20me%20why%20it's%20not%20working%2C%20I've%20been%20trying%20for%20ages.%20I'm%20happy%20to%20send%20screenshots%20of%20my%20actual%20work%20if%20this%20example%20is%20too%20confusing.%20Thanks%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards%2C%3C%2FP%3E%3CP%3ELiam%20Reed%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3129723%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3129895%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamic%2C%20Horizontal%20Named%20Ranges%20for%20Use%20in%20Dependent%20Drop-Down%20Lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3129895%22%20slang%3D%22en-US%22%3EPerhaps%20this%20gives%20you%20an%20idea%20for%20an%20alternative%20approach%3A%20%3CA%20href%3D%22https%3A%2F%2Fjkp-ads.com%2FDownload.asp%23DependentValidation%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fjkp-ads.com%2FDownload.asp%23DependentValidation%3C%2FA%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi folks,

 

I've been having some trouble with using a dynamic, horizontal named range in a dependent drop-down list. My situation is the following: I am doing up a budget for myself and listing the name and location of each merchant. Some merchants are visited at multiple locations (e.g. McDonald's). I have been able to set up a drop-down to select from a list of merchants that I have previously visited. However, I have not been able to set up a drop-down to select the locations that I have previously entered for those merchants. The following table is an example of what my work looks like.

MerchantLocationWithdrawal
Merchant ALocation A1$5
Merchant ALocation A2$10
Merchant BLocation B1$20
Merchant ALocation A1$15
Merchant BLocation B2$10
Merchant CLocation C1$5
Merchant ALocation A2$20

I have text tables on a separate worksheet listing the unique and distinct merchants, and their associated unique and distinct locations as dynamic, horizontal named ranges so that they can accommodate new locations automatically. In the above table, I use an in-cell drop-down in the Merchant column to select between Merchants A, B, or C. Once I have selected a merchant, the associated dependent drop-down in the Location column allows me to select from any of the locations for that merchant. E.g., If I select Merchant A from the drop-down to enter a transaction for, I can then use a drop-down in the Location column to select from Locations A1, A2, or A3. My problem is the second part of that process; I just can't get the horizontal named range to display as a drop-down. Currently, based on this example, I am using the formula: =OFFSET(first_cell_of_named_range, 0, 0, 1, COUNTA(row_number_of_named_range:row_number_of_named_range)) I've tried with and without absolute references, too.

 

Would anyone be able to provide any help? It's really been bugging me why it's not working, I've been trying for ages. I'm happy to send screenshots of my actual work if this example is too confusing. Thanks in advance.

 

Kind regards,

Liam Reed

2 Replies
Perhaps this gives you an idea for an alternative approach: https://jkp-ads.com/Download.asp#DependentValidation
best response confirmed by Liam_Reed (Occasional Contributor)
Solution
Thanks for the response. Thankfully, I have figured it out with - I kid you not - the most simple solution in the world. Since my multiple locations for a single merchant were being returned horizontally by a spill formula, all I had to do to refer to that spill formula as a named range as it kept expanding was add a '#' to the end of it. Can't believe it took me one character to solve the problem. Thanks again anyway.