ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I create a command from a list box (https://www.excelbanter.com/excel-discussion-misc-queries/32953-how-do-i-create-command-list-box.html)

Issuesinmonument

How do I create a command from a list box
 
I want to select an item in a scroll list or drop down box and by selecting a
specific item in that list have excell proform a different function. For
example: I have a list of numbers that each represent a discription. I want
to select the number from the list and have excell paste the description for
that number in a different box. I want each different number to have a
different description.

Dave Peterson

You could use Data|Validation and =vlookup().

Put the list in sheet2, column A. Put the description in sheet2, column B.

Then if your cell is A1 (of sheet1), you can put this in B1:

=if(a1="","",vlookup(a1,sheet2!a:b,2,false))

If you've never used =vlookup(), visit Debra Dalgleish's site:
http://www.contextures.com/xlFunctions02.html
for nice instructions.

And for Data|Validation:
http://www.contextures.com/xlDataVal01.html

Issuesinmonument wrote:

I want to select an item in a scroll list or drop down box and by selecting a
specific item in that list have excell proform a different function. For
example: I have a list of numbers that each represent a discription. I want
to select the number from the list and have excell paste the description for
that number in a different box. I want each different number to have a
different description.


--

Dave Peterson


All times are GMT +1. The time now is 08:22 PM.

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