+ Reply to Thread
Results 1 to 3 of 3

Help with Match Function

  1. #1
    Registered User
    Join Date
    08-16-2003
    Location
    Toronto
    Posts
    4

    Help with Match Function

    I have a list of names in column.

    1 A
    2 B
    3 A
    4 C
    5 A

    I need the match function to bring the location of the second A (3) and the last A (5)

  2. #2
    Sandy Mann
    Guest

    Re: Help with Match Function

    For the last A in A1:A10 try:

    =MAX(--(A1:A10="A")*(ROW(1:10)))
    entered as an array formula with Ctrl + Shift + Enter

    for the second A try:

    =SMALL(--(A1:A10="A")*(ROW(A1:A10)),ROW(A10)-SUM(--(A1:A10="A"))+2)
    Again entered as an array formula.

    But watch this space, there will be someone anong in a minute with a more
    elegant solution.

    --
    HTH

    Sandy
    [email protected]
    [email protected] with @tiscali.co.uk
    "yanf7" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I have a list of names in column.
    >
    > 1 A
    > 2 B
    > 3 A
    > 4 C
    > 5 A
    >
    > I need the match function to bring the location of the second A (3) and
    > the last A (5)
    >
    >
    > --
    > yanf7
    > ------------------------------------------------------------------------
    > yanf7's Profile:
    > http://www.excelforum.com/member.php...info&userid=19
    > View this thread: http://www.excelforum.com/showthread...hreadid=517508
    >




  3. #3
    Sandy Mann
    Guest

    Re: Help with Match Function

    Woh!
    Not only is it not very elegant but I changed the constant number 10 to
    Row(A10) at the last minute before posting because I thought that it would
    proof it against adding rows above the data but it does not. Use:

    =SMALL(--(A1:A10="A")*(ROW(A1:A10)),10-SUM(--(A1:A10="A"))+2)
    or
    =SMALL(--(A1:A10="A")*(ROW(A1:A10)),COUNT(ROW(A1:A10))-SUM(--(A1:A10="A"))+2)

    But still keep watching this space.

    --
    HTH

    Sandy
    [email protected]
    [email protected] with @tiscali.co.uk


    "Sandy Mann" <[email protected]> wrote in message
    news:[email protected]...
    > For the last A in A1:A10 try:
    >
    > =MAX(--(A1:A10="A")*(ROW(1:10)))
    > entered as an array formula with Ctrl + Shift + Enter
    >
    > for the second A try:
    >
    > =SMALL(--(A1:A10="A")*(ROW(A1:A10)),ROW(A10)-SUM(--(A1:A10="A"))+2)
    > Again entered as an array formula.
    >
    > But watch this space, there will be someone anong in a minute with a more
    > elegant solution.
    >
    > --
    > HTH
    >
    > Sandy
    > [email protected]
    > [email protected] with @tiscali.co.uk
    > "yanf7" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> I have a list of names in column.
    >>
    >> 1 A
    >> 2 B
    >> 3 A
    >> 4 C
    >> 5 A
    >>
    >> I need the match function to bring the location of the second A (3) and
    >> the last A (5)
    >>
    >>
    >> --
    >> yanf7
    >> ------------------------------------------------------------------------
    >> yanf7's Profile:
    >> http://www.excelforum.com/member.php...info&userid=19
    >> View this thread:
    >> http://www.excelforum.com/showthread...hreadid=517508
    >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1