Microsoft Excel - prepopulating fields based on selection

airwalk_90

New Member
Joined
Aug 6, 2010
Messages
1
Hi there -

how do i link data in excel?

My problem is that I want to assign attributes to names in a drop down list. So if i chose x in the drop down list, then attributes a,b,c will appear in the next column. and when i chose y in the drop down list, then attributes d,e,f will appear in the next column and so on... can anyone help me please?

i.e. depending on what i pick from the drop down list in column A, will dictate what i can pick in the drop down list in column B.

Thanks in advance.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

babycody

Well-known Member
Joined
Jul 8, 2003
Messages
1,395
You could create a list if you have excel 2003 or higher. It is pretty simple to do what you want. Create a new sheet, and then select cell A1. From the menus choose Data>List>Create List. In the first column you will put your x & y values. In the second column you will put the a,b,c values. In the third column you will put the d,e,f values. Now you will need to define a name for each column. ***NOTE*** To avoid unwanted blanks in your pull downs it is best to skip a column every time you create a new list. So the list I have described should be in column A,C,E. In the first column can give it any name you like, so lets just name it product. To do this select all of the cells in the first column, that are within the list, all the way down to the *. At the top of your screen, next to the formula bar you will see the "name box". It's the box that shows the address of the cell you have selected. When you huver over it a hint should pop up saying "Name Box". Click within this box, and type in product. Now press the Enter key. You can use any name you like, but spaces are not allowed. Instead use an underscore _ . The other two columns do have to have a particular name. You will perform all of the previous steps for naming the other columns except this time you will name the second column X, and the third column Y.
Now to actually create the validation list... Go to the sheet you wish to have the drop downs in. Select the cell where the user will choose x or y. From the menus choose Data>Validation then select the Settings tab. From the allow menu choose List. In the source box type =product, and press OK. Now in the next column over, where the attribute are chosen, create another validation list just like we did before except this time instead of =product you are going to type =indirect(A1). Replace A1 with the actual cell address of your first validation list (The cell with the X,Y choice). The great thing about this is that you can add to these list, and the new items will automatically be added to the drop down list. If you have a new list of attribute (g,h,i) later on then just use this as a guide to create an additional list. Also keep in mind that you can not name a range A345 or anything that is a cell reference. You can use A_345 though. HTH

If I did not give you a good enough explanation then you could probably Google: "dependent validation list" for a different explanation.
 
Last edited:
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,033
Messages
5,856,941
Members
431,841
Latest member
jaybeem

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top