![]() |
How do i have one Drop down list reference another drop down list
I have set up a form on the second sheet of a workbook. The first sheet
contains all relevent information for clients(in my case physicians). On the second sheet i have set up a form, which will be used in the office, that has a combo box list (i used the one available in the forms toolbar, as i do not have the coding experience to use the ones in the control toolbox). This list references the project name, and the cell reference is cell n1. I then used the vlookup function to reference cell n1 and find the equivalent match within sheet 1 using identifiers for each reference. ie project one (the first option in the dropdown list) has an identifier of 1 within sheet one. So if the value in N1 is 1 then all of the vlookup functions in the rest of the form return the equivalent value for Idenfier 1 from Sheet 1. So in essence whenever i change the Project name, all data in the form changes to the corresponding identifier reference. However each project has different clients with in it. SO when i choose a project is automatically returns the first name with that identifier. My question is how do i make another combo box which references the previous list and returns only the clients that have that common project name. Any help is appreciated. I have visited the contextures website which i have seen referenced here often and am throughly confused. Thanks again and sorry for the wordiness. |
How do i have one Drop down list reference another drop down list
First of all, in sheet1 all the records of the same identifier need to be
together in consective rows. If not already grouped together, you can do so by sorting the identifier column. Next is to make a dynamic name range based on cell N1. From top menu go to Insert --- Name --- Define... You can name it whatever you want, in reference box, put: =OFFSET(INDIRECT(ADDRESS(MATCH(N1,Sheet1!A:A,0),2, ,,"Sheet1")),0,0,COUNTIF(Sheet1!A:A,N1),1) This is assuming your identifier column is the first column in Sheet1, and you're looking to return corresponding values in column 2. Modify according to your needs. Then make your combo box 2, with Input Range referring to your dynamic name range. Your combo box 2 values should change according to your combo box 1 selection. -Simon "pblenis" wrote: I have set up a form on the second sheet of a workbook. The first sheet contains all relevent information for clients(in my case physicians). On the second sheet i have set up a form, which will be used in the office, that has a combo box list (i used the one available in the forms toolbar, as i do not have the coding experience to use the ones in the control toolbox). This list references the project name, and the cell reference is cell n1. I then used the vlookup function to reference cell n1 and find the equivalent match within sheet 1 using identifiers for each reference. ie project one (the first option in the dropdown list) has an identifier of 1 within sheet one. So if the value in N1 is 1 then all of the vlookup functions in the rest of the form return the equivalent value for Idenfier 1 from Sheet 1. So in essence whenever i change the Project name, all data in the form changes to the corresponding identifier reference. However each project has different clients with in it. SO when i choose a project is automatically returns the first name with that identifier. My question is how do i make another combo box which references the previous list and returns only the clients that have that common project name. Any help is appreciated. I have visited the contextures website which i have seen referenced here often and am throughly confused. Thanks again and sorry for the wordiness. |
How do i have one Drop down list reference another drop down l
I used the below formula, but there are still having problems. As an example:
Spot ID Identifier Clients Last Name DOB SSN 1 1 Albertsons Harris 9/5/2002 235-61-3219 2 2 JC Penny Wade 2/3/2004 123-25-4568 3 3 Sams Johnson 11/4/1998 111-55-6648 4 4 Target Avery 2/23/1978 444-65-2358 5 4 Target O'Neal 6/30/1987 654-96-8745 6 6 Wal-Mart Smith 2/5/2003 222-22-2222 7 6 Wal-Mart Jones 4/8/2006 333-22-3333 8 6 Wal-Mart Graham 8/4/1965 238-623-9764 9 9 Win Dixie O'Conner 4/5/1963 132-96-3025 On sheet two the first drop down references Clients and the input range is Sheet1 C2:C10...this dropdown list is fine but it does have the option of picking each of the multiple entries (is this a problem). When i make the dynamic name range (the N1 from orinal post) like you said i reference the cell that corresponds to the appropriate value in column 2 in sheet 1. However, i keep getting errors. I want the second drop down to only have the names that appear where the Client (sheet 1 column c) is the same. Any more idea, what might i be doing wrong. "SimonCC" wrote: First of all, in sheet1 all the records of the same identifier need to be together in consective rows. If not already grouped together, you can do so by sorting the identifier column. Next is to make a dynamic name range based on cell N1. From top menu go to Insert --- Name --- Define... You can name it whatever you want, in reference box, put: =OFFSET(INDIRECT(ADDRESS(MATCH(N1,Sheet1!A:A,0),2, ,,"Sheet1")),0,0,COUNTIF(Sheet1!A:A,N1),1) This is assuming your identifier column is the first column in Sheet1, and you're looking to return corresponding values in column 2. Modify according to your needs. Then make your combo box 2, with Input Range referring to your dynamic name range. Your combo box 2 values should change according to your combo box 1 selection. -Simon "pblenis" wrote: I have set up a form on the second sheet of a workbook. The first sheet contains all relevent information for clients(in my case physicians). On the second sheet i have set up a form, which will be used in the office, that has a combo box list (i used the one available in the forms toolbar, as i do not have the coding experience to use the ones in the control toolbox). This list references the project name, and the cell reference is cell n1. I then used the vlookup function to reference cell n1 and find the equivalent match within sheet 1 using identifiers for each reference. ie project one (the first option in the dropdown list) has an identifier of 1 within sheet one. So if the value in N1 is 1 then all of the vlookup functions in the rest of the form return the equivalent value for Idenfier 1 from Sheet 1. So in essence whenever i change the Project name, all data in the form changes to the corresponding identifier reference. However each project has different clients with in it. SO when i choose a project is automatically returns the first name with that identifier. My question is how do i make another combo box which references the previous list and returns only the clients that have that common project name. Any help is appreciated. I have visited the contextures website which i have seen referenced here often and am throughly confused. Thanks again and sorry for the wordiness. |
How do i have one Drop down list reference another drop down l
|
How do i have one Drop down list reference another drop down l
This is better with the sample records you provided. For the named range, try:
=OFFSET(INDIRECT(ADDRESS(MATCH(Sheet1!$N$1,Sheet1! $B:$B,0),4,,,"Sheet1")),0,0,COUNTIF(Sheet1!$B:$B,S heet1!$N$1),1) My mistake on the previous post was not useing $ for absolute references. Guessing wrong on what columns you had for each field of data didn't help either. You can't make the combo box selections with unique values if your input range doesn't have unique values. However, you can make a unique value list from your original list, and refer to the new list with your first combo box. Select your Clients column From top menu go to Data --- Advanced Filter Select Copy to another location Fix List range if necessary Pick a Copy to location Check Unique records only check box Change your input range for combo box 1 to the new list with unique records Make sure you change your identifiers for Wal-Mart to 5, and Win Dixie to 6. -Simon "pblenis" wrote: I used the below formula, but there are still having problems. As an example: Spot ID Identifier Clients Last Name DOB SSN 1 1 Albertsons Harris 9/5/2002 235-61-3219 2 2 JC Penny Wade 2/3/2004 123-25-4568 3 3 Sams Johnson 11/4/1998 111-55-6648 4 4 Target Avery 2/23/1978 444-65-2358 5 4 Target O'Neal 6/30/1987 654-96-8745 6 6 Wal-Mart Smith 2/5/2003 222-22-2222 7 6 Wal-Mart Jones 4/8/2006 333-22-3333 8 6 Wal-Mart Graham 8/4/1965 238-623-9764 9 9 Win Dixie O'Conner 4/5/1963 132-96-3025 On sheet two the first drop down references Clients and the input range is Sheet1 C2:C10...this dropdown list is fine but it does have the option of picking each of the multiple entries (is this a problem). When i make the dynamic name range (the N1 from orinal post) like you said i reference the cell that corresponds to the appropriate value in column 2 in sheet 1. However, i keep getting errors. I want the second drop down to only have the names that appear where the Client (sheet 1 column c) is the same. Any more idea, what might i be doing wrong. "SimonCC" wrote: First of all, in sheet1 all the records of the same identifier need to be together in consective rows. If not already grouped together, you can do so by sorting the identifier column. Next is to make a dynamic name range based on cell N1. From top menu go to Insert --- Name --- Define... You can name it whatever you want, in reference box, put: =OFFSET(INDIRECT(ADDRESS(MATCH(N1,Sheet1!A:A,0),2, ,,"Sheet1")),0,0,COUNTIF(Sheet1!A:A,N1),1) This is assuming your identifier column is the first column in Sheet1, and you're looking to return corresponding values in column 2. Modify according to your needs. Then make your combo box 2, with Input Range referring to your dynamic name range. Your combo box 2 values should change according to your combo box 1 selection. -Simon "pblenis" wrote: I have set up a form on the second sheet of a workbook. The first sheet contains all relevent information for clients(in my case physicians). On the second sheet i have set up a form, which will be used in the office, that has a combo box list (i used the one available in the forms toolbar, as i do not have the coding experience to use the ones in the control toolbox). This list references the project name, and the cell reference is cell n1. I then used the vlookup function to reference cell n1 and find the equivalent match within sheet 1 using identifiers for each reference. ie project one (the first option in the dropdown list) has an identifier of 1 within sheet one. So if the value in N1 is 1 then all of the vlookup functions in the rest of the form return the equivalent value for Idenfier 1 from Sheet 1. So in essence whenever i change the Project name, all data in the form changes to the corresponding identifier reference. However each project has different clients with in it. SO when i choose a project is automatically returns the first name with that identifier. My question is how do i make another combo box which references the previous list and returns only the clients that have that common project name. Any help is appreciated. I have visited the contextures website which i have seen referenced here often and am throughly confused. Thanks again and sorry for the wordiness. |
All times are GMT +1. The time now is 04:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com