I am setting up a database template for people who are not Excel trained and I am attempting to make the input easy for the users as well as myself when I begin analyzing the data. I am trying to an if-then statement or create a macro (I know nothing about macros) that will allow me to have the users select their county for a list validation and the county number appear the cell to the right of the county name.
You can create a validation list on a hidden worksheet that has 2 columns:
Column A contains the country names; column B contains the number values.
Then create 2 named ranges:
Range named "Country" that refers to column A only, and
Range named "Country_Codes" that refers to both columns A & B.
On your user input form, add validation to the cell that the user will input the country name.
The validation type will be a list, and in the list textbox enter "=Country" (omitting the quotes).
Make sure you check "In-Cell Dropdown"
Now for the field to the right that you want to contain the number:
Use the formula "=VLOOKUP(whatever cell has the country name,Country_Codes,2,FALSE)"