drop down menu length

J

James

hi all,
I'm using excel 2000.
Is there a way to have a drop down list that displays the full text, but
upon selection only returns the first 3 characters? for example,
in the list I have : 123 apples, 345 Oranges.
I want the Users to see "123 apples", but when they choose it, only "123" is
placed in the cell.

TIA

James
 
J

Jason Morin

The easiest way is to simply extract the first 3 letters
in an adjacent cell:

=LEFT(A1,3)

HTH
Jason
Atlanta, GA
 
B

Biff

Hi!

If you have in your list:

123 apples
123 oranges

How will you know what 123 refers to?

This can probably be done with an event change macro.

Biff
 
J

James

the user that fills out the form needs to see 123 Apples, the end user
doesn't need to see it.
What is an event change macro?
 
B

Biff

Hi!

An event change macro is a piece of VBA code that is
triggered by a specific change that takes place.

In your example, when someone chooses 123 apples from the
dropdown, 123 apples would be entered into the cell. The
act of entering is an event and would trigger the macro to
run converting the cell value from 123 apples to 123.

Sorry, but I can't help you with VBA code. Maybe someone
will follow-up or you can post this in the Programming
group.

Biff
 
D

Debra Dalgleish

There's a sample workbook on my web site that shows a product name and
code in the Data Validation dropdown list. After an item is selected,
the cell shows only the product name. You should be able to adapt this
to your workbook.

On the following page:

http://www.contextures.com/excelfiles.html

Under the data validation heading, find 'Data Validation "Columns"' and
download the file named DataValNameID.xls
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top