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.
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

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:

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,785
Messages
5,513,433
Members
408,952
Latest member
Dram16

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top