View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
troy@eXL troy@eXL is offline
external usenet poster
 
Posts: 7
Default Data validation drop down list selection change

On Oct 4, 1:58 pm, Mekinnik
wrote:
Is there a way to change what is entered into a cell from a drop down list..
Basiclly what I want to do is when the user selects a state from the drop
down list lets say from column a1 I want instead of the state name to fill in
the cell, I want the state abbreviation to fill the cell again, based off the
users selection from the drop down list. I created the drop down list useing
the Data Validation tool. I thought of using an If statement however that
would be monsterous due to there of course being 50 states. Any assistance
would be greatly appreciated.

Thank you


Hi Mekinnik,

Does the abbreviation have to be in the same cell? I'm not sure that's
possible as the validation would only allow the full state names ??

In another cell you could have a VLOOKUP formula though.

Next to the list you use for your data validation add a column with
corresponding abbreviations and reference this from your VLOOKUP
formula. Of course this will give you a state name and an
abbreviation, but you could hide the column with the full names in it
before sending out your report.

Alternatively you could use a listbox or combobox instead of data
validation. Depending on your sheet this could complicate things but
would allow you to have just one cell with the abbreviation in it (the
state name will be in the box). You can make the box so that it's not
printed so although you'll see it in your sheet you won't on your
printed report.

HTH

cheers,
t.