+ Reply to Thread
Results 1 to 2 of 2

Checking for value in list & returning positions for multiple matches

  1. #1
    Registered User
    Join Date
    04-16-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Checking for value in list & returning positions for multiple matches

    Hi I have the following sample data

    a
    b
    c
    d
    a
    a
    d

    What I need is to return the position of the "a" character in the list but not stopping at the first match. Can this be done? I am using MATCH function but this is limited to the first match only?

    Thanks for any suggestions

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Checking for value in list & returning positions for multiple matches

    If you want to use 1 formula and you don't have thousands of rows, then

    assuming your data is in A2:A8 try:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER and copied down.

    else, add a helper column in B2:

    =IF(A2="a",COUNT(B$1:B1)+1,"")

    copied down and then to get data:

    =IF(ROWS($A$2:$A2)>MAX($B$2:$B$8),"",MATCH(ROWS($A$1:$A1),$B$2:$B$8,0))

    copied down

    You can add an INDEX() function around the SMALL or MATCH parts to extract corresponding data from another column
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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