Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Number indicating List Position

  1. #1
    MrExcel MVP
    Join Date
    Apr 2002
    Location
    Vancouver BC , Canada
    Posts
    6,259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #3
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    84,021
    Post Thanks / Like
    Mentioned
    37 Post(s)
    Tagged
    7 Thread(s)

    Default

    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

  4. #4
    MrExcel MVP
    Join Date
    Apr 2002
    Location
    Vancouver BC , Canada
    Posts
    6,259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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>

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •