SOLVED

Data Validation cascading

Copper Contributor

I have a form to fill in excel with two columns First Name and Last Name. Both are validation lists and the last name should be dependent on the value of the first name. I have a total of 400 names. See below as an example:

 

Hidden worksheet with ONLY two columns:

FName

LName

JohnDoe
KevinHart
KevinKinsley
RobHoward
John Rambo

 

Visible sheet for the user

First Name: User to select

Dropdown List available:

John
Kevin
Rob

 

Last Name: User to select based on the first name

Eg. If the user selects John, the dropdown list should be 

Doe
Rambo

 

Similarly for Kevin and Rob.

I hope this is clear :)

 

Thank You

6 Replies

@robustexcel 

 

Here you go. I didn't create the form, but assume you can do that. This is an illustration of what the new Dynamic Array functions can perform. I used FILTER, UNIQUE, and SORT in this. You can add names to your heart's content in the table in the top left corner of the sheet. The drop-downs will automatically include the new ones, in alphabetical order.

 

Enjoy!

Hi @mathetes,

 

Thank you for helping out.  I am getting this in all the cells that you have a formula in. :(

#NAME?

 

I have excel 2016

@robustexcel 

"I have excel 2016"

The workbook uses functions only available in Office 365.

Functions like UNIQUE, FILTER and SORT tend to be manual operations in previous versions of Excel and are not that easy to emulate as formulas.

@mmathes 

You may like the attached version of your workbook.  The dependency between first and last names works both ways.  The subordinate selection usually has to be cleared before the main selection is reselected.

i really apologize guys. 

It still gives me an error.

 

This my excel version (image attached)

 

fname

=_xlfn._xlws.SORT(_xlfn.UNIQUE(_xlfn._xlws.FILTER(Employee[Fname], Employee[Lname]=LName.selected, Employee[Fname])))

 

lname

=_xlfn._xlws.SORT(_xlfn.UNIQUE(_xlfn._xlws.FILTER(Employee[Lname], Employee[Fname]=FName.selected, Employee[Lname])))

 

select fname

=_xlfn.ANCHORARRAY($H$3)

 

select lnname

=_xlfn.ANCHORARRAY($D$2)

best response confirmed by robustexcel (Copper Contributor)
Solution

@robustexcel 

The attached might work in Excel 2016, but I have no way of finding out.  Working without FILTER and UNIQUE is somewhat like trying to use a lawnmower to trim a hedge; simply the wrong tool for the job!

 

p.s. I have only just looked at the file you attached showing your Excel version.  If it is Office 365 monthly then it is very odd that the original files do not work for you.

 

@robustexcel 

 

I agree with@Peter Bartholomew : If you have Office 365 Pro Plus (or whatever it was; that was the idea) it doesn't make full sense. You should check and see if you can get the latest Dynamic-Array-Ready version.

 

Unless you're in a government office where it takes a while; I did exchange a similar suggestion with someone last month. She had the latest on her Microsoft Surface pad and could see how the ARRAY functions worked, but the government supplied work computer wasn't able to run them and the IT department would take a while to get to it.

 

Those tools are quite astounding. This YouTube video is a great intro if you have any doubts.

https://www.youtube.com/watch?v=9I9DtFOVPIg

 

1 best response

Accepted Solutions
best response confirmed by robustexcel (Copper Contributor)
Solution

@robustexcel 

The attached might work in Excel 2016, but I have no way of finding out.  Working without FILTER and UNIQUE is somewhat like trying to use a lawnmower to trim a hedge; simply the wrong tool for the job!

 

p.s. I have only just looked at the file you attached showing your Excel version.  If it is Office 365 monthly then it is very odd that the original files do not work for you.

 

View solution in original post