![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
I would like to find one simple function that will do the following.
When you select an Item from a drop down list that a function output a number indicating the selected items position in the list. For example let's say you have a drop down list with BC,Alt,CC,Ont in it. And the user selects "CC" that the function would give a result of "3" So if you had a drop down in A1 the function would be Function(A1)=3 I already have methods to do this that involve functions involving lookup tables ... arrays etc! So what I'm looking for is a simple built-in function to replace the complex method ... Thanks. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
If by "drop down list" you mean Combo Box... the index of the selected item is returned to the designated Cell_link. Right-click on the Combo Box and choose Format control... from the popup menu.
[ This Message was edited by: Mark W. on 2002-05-09 12:01 ] |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=MATCH(A1,List,0) will give you the pos of the selection in A1 where the dropdown list has been anchored. Aladin |
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Thanks guys.
Yep the info you gave me has done it for me. My dropdowns are usually thru validation and come from a named list so the match solution works very well for me.
__________________
<MARQUEE>...........Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic...............The easiest thing to find is fault, don't be easy !.. --Anonymous--...</marquee> |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|