Number indicating List Position

Nimrod

MrExcel MVP
Joined
Apr 29, 2002
Messages
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.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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
 
Upvote 0
On 2002-05-09 11:55, Nimrod wrote:
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.

It depends on whether you have this list in some range. Suppose that that is the case and it is named List.

=MATCH(A1,List,0)

will give you the pos of the selection in A1 where the dropdown list has been anchored.

Aladin
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,435
Members
448,898
Latest member
dukenia71

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