ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   drop down menu length (https://www.excelbanter.com/excel-worksheet-functions/14456-drop-down-menu-length.html)

James

drop down menu length
 
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



Jason Morin

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

=LEFT(A1,3)

HTH
Jason
Atlanta, GA

-----Original Message-----
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


.


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

-----Original Message-----
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


.


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?
"Biff" wrote in message
...
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

-----Original Message-----
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


.




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

-----Original Message-----
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?
"Biff" wrote in message
...
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

-----Original Message-----
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


.



.


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


James wrote:
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




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 07:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com