View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Excell Dropdown List. Display alternate text than found in list.

You could use some code to replace the name with the id number.

But I would would use an adjacent cell so that I could display both.

If A1 contained the name (a cell with data|validation???), then in B1:
=if(a1="","",vlookup(a1,sheet2!a:b,2,false)

Where Sheet2 contained the list of names in column A and the ID's in column B.

But if you want, Debra Dalgleish has a sample workbook he
http://contextures.com/excelfiles.html#DataVal
Look for:
DV0004 - Data Validation Change -- Select a Product from the Data Validation
list; an event procedure changes the product name to a product code.
DataValCode.zip 8 kb



Shawnn wrote:

I have a form that uses a dropdown list to show employee names. What I want
to do is allow the names to be selected in the dropdown list but the employee
number to actually be inserted into the form. Is this even an option?


--

Dave Peterson