Data Validation - Cell Only Displaying First 5 Characters Of Listbox - Left text formula?!

penhaifai

New Member
Joined
Feb 5, 2011
Messages
2
Is there a way with "Data Validation" where the data that shows on the drop down box, when selected, only displays the first five characters on the cell. For eg In a worksheet, List Range has got data validation settings whereby the value to be input in those cells comes from a list. The list looks something like this: "30000 Staff", "30010 Parking", "30020 Retail Store in Market St".

If I want to select for first selection from my the listbox - "30000 Staff" , what do I need to do to have only the value "30000" show up in output cell and not "30000 Staff". The reason I only need the numbers to show up is because that will in turn be used in another functions functions and save space instead of showing long information. The reason I am showing "staff, Parking, Retail" in my listbox is to give users additional information as a guidance to choose the correct code for those cells.

I tried to use Left formula but it didn't take List Range nor the dynamic name of a list; e.g. both of these didn't work;
=LEFT($AY$5:$AY$10,5)
=LEFT(Vendor_List,5)
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Could you use a helper cell?

Say A1 has your DV dropdown list
B1 has =LEFT(A1,5)
Then reference B1 in your other formulas.
 
Upvote 0
Nice trick! :) I may ended up with it if nothing works or can't find direct way. The hole point is to get ride of the explanation when you are done see what code you need to pick. So instead of showing;
50000 Toyota RAV4

I should see;

50000



Thank you!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top