ellsworth2000
asked on
How do I make an Excel Field auto populate based upon selection of previous field?
Hello Experts,
Please view the attached print screen of the Excel file I'm working with. When one of the selections in cell O2 is made I'd like cell P2 to autopopulate with the corresponding data that is color coded. Also this is being modified in Excel 2007 on WIndows XP sp3.
Many Thanks Experts,
Ellsworth
Please view the attached print screen of the Excel file I'm working with. When one of the selections in cell O2 is made I'd like cell P2 to autopopulate with the corresponding data that is color coded. Also this is being modified in Excel 2007 on WIndows XP sp3.
Many Thanks Experts,
Ellsworth
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much Jppinto,
I'm making some progress but I can't make step CVL8 from your link work. Everytime i click ok i receive an error that "a named range cannot be found." I thought "Markets" was my Named Range but it doesn't seemt to find it. I'm very in-experienced with excel so I'm hoping I'm making a simple mistake.
Ellsworth
up-to-CVL8.xlsx
I'm making some progress but I can't make step CVL8 from your link work. Everytime i click ok i receive an error that "a named range cannot be found." I thought "Markets" was my Named Range but it doesn't seemt to find it. I'm very in-experienced with excel so I'm hoping I'm making a simple mistake.
Ellsworth
up-to-CVL8.xlsx
The formula for the second Data Validation list should be:
=CHOOSE(VLOOKUP(O2,Sheet2! $A$3:$B$6, 2,FALSE),E nergyMiner als,BaseMe tals,Indus trialMiner als,Precio usMetals)
I've attached a working sample.
jppinto
up-to-CVL8.xlsx
=CHOOSE(VLOOKUP(O2,Sheet2!
I've attached a working sample.
jppinto
up-to-CVL8.xlsx
ASKER
Jppinto,
I noticed that there is no database sheet for the example you gave me. I think I could figure it out if ihad that.
Thanks,
Ellsworth
I noticed that there is no database sheet for the example you gave me. I think I could figure it out if ihad that.
Thanks,
Ellsworth
Yes there is! CVL2 is the image of the "database" sheet!
ASKER
Actually Jppinto,
if you have the original Country and City excel document I think I could figure things out if I could look at it.
Thanks,
ellsworth
if you have the original Country and City excel document I think I could figure things out if I could look at it.
Thanks,
ellsworth
I don't have the original file here at work. But I attached your sample file working with the correct formula...did you saw it? Do you still need help putting this to work on your file?
ASKER
Sorry Jppinto I didn't see the two replies you made I'll try that formula
ASKER
So that formula gives me a different error:
"You cannot use references to other workstheets or workbooks for Data Validation criteria"
"You cannot use references to other workstheets or workbooks for Data Validation criteria"
ASKER
Okay so I'm a moron when it comes to excel but as far as i can tell the sample file doesn't bring up the data pertaining to the previous field selection. I don't even see a Data Validation formula in the P2 cell.
Sorry to be a pain Jppinto and thank you for your patience
Sorry to be a pain Jppinto and thank you for your patience
ASKER
For example if I select Base Metals in Cell O2 from the sample, then I'd like only "Aluminum", "Copper/Nickel/Zinc/Lead", "Iron/Titanium" and "Others" to be the only options in the drop down menu in Cell P2
ASKER
So i just did everything that was listed on the (https://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/A_4454-Cascading-Validation-Lists.html) link, and I still get the "You cannot use references to other workstheets or workbooks for Data Validation criteria" error again. I'm messing something up from the get go.
The indexes are colored red on the database sheet; are there any specific instructions for creating indexes or just number everything in red and that is all I need for Indexes?
The indexes are colored red on the database sheet; are there any specific instructions for creating indexes or just number everything in red and that is all I need for Indexes?
I'm attaching the file again...I checked, did the example you posted, and it only gives me the options on cell P2 you mentioned when I select "Base Metals" on cell O2!
Don't see what is the problem, it's working with me! Are you sure you are doing it right?
up-to-CVL8.xlsx
Don't see what is the problem, it's working with me! Are you sure you are doing it right?
up-to-CVL8.xlsx
The red font is just to indicate that the number on column B on CVL2 are related to the number on row 1 oc CVL1. In other words, country "England" corresponds to the index 1 wich will point to the range name "England" to pick the cities from that range.
Did you check the file I attached? Is it working fine for you? For me it's OK.
Did you check the file I attached? Is it working fine for you? For me it's OK.
ASKER
And now I just tried the instructions on MS Excel 2010 at the website: https://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/A_4454-Cascading-Validation-Lists.html, and now i receive the error: "The Source currently evaluates to an error. Do you want to continue?"
There is something very basic that I'm missing in this.....I think
There is something very basic that I'm missing in this.....I think
Just say "Yes" to that question. It works anyway.
ASKER
No that file didn't work
ASKER
I clicked yes and it didn't work. When I choose England and then try to choose a city, no cities are shown when click the drop down arrow
Do you want to post YOUR file for me to take a look?
ASKER
yea that would be great Test-with-countries.xlsx
ASKER
Are you on Excel 2010? I'm on 2007. When I opened this excel file France was already in the Country Cell(CellB1) and Touluse was in the City Cell(Cell B2) and the cell is Yellow.
So I tried changing France to England, which worked, and Touluse stayed the same. Also there isn't a drop down box for Touluse(City Cell B2) nor is the Validation formula in Data Validation: =CHOOSE(VLOOKUP(B1,Sheet3! $A$3:$B$5, 2,FALSE),E ngland,Fra nce,Portug al)
So I tried changing France to England, which worked, and Touluse stayed the same. Also there isn't a drop down box for Touluse(City Cell B2) nor is the Validation formula in Data Validation: =CHOOSE(VLOOKUP(B1,Sheet3!
ASKER
How did you make the cell yellow?
ASKER
NM i figured out how to make the cell yellow
If you change France to England, and go to cell B2, there is a drop down there and if you open it will only show cities from England now, while before changing the country, it only displayed cities from France.
ASKER
So what I've found is that I couldn't make the formula: =CHOOSE(VLOOKUP(B1,Sheet3! $A$3:$B$5, 2,FALSE),E ngland,Fra nce,Portug al) work very well.
The formula that did work is Indirect(B1) which was placed in cell B2 as Data validation criteria. As far as I can tell that works but I just want to make sure I'm not limiting my self. In your opinion Jppinto; doese INDIRECT(B1) make sense to you?
The formula that did work is Indirect(B1) which was placed in cell B2 as Data validation criteria. As far as I can tell that works but I just want to make sure I'm not limiting my self. In your opinion Jppinto; doese INDIRECT(B1) make sense to you?
ASKER
Now back to the oringinal Excel file i was working on:
I had to use this formula to make this work being that I had two-word selections: =INDIRECT(SUBSTITUTE(O2," ",""))
I had to use this formula to make this work being that I had two-word selections: =INDIRECT(SUBSTITUTE(O2," ",""))
ASKER
also this website came in very handy: http://www.contextures.com/xldataval02.html
ASKER
I'm not sure why the formula: =CHOOSE(VLOOKUP(B1,Sheet2! $A$3:$B$5, 2,FALSE),E ngland,Fra nce,Portug al) wouldn't work for me but from what I've researched it should have worked. I'm probably making a simlple begginner mistake.
Thank you for all your help Jppinto!!!!
Ellsworth
Thank you for all your help Jppinto!!!!
Ellsworth
jppinto
Data-Validation-Example.xls