+ Reply to Thread
Results 1 to 4 of 4

Match string in one column, return value in same row, skip rows that down't match

  1. #1
    Registered User
    Join Date
    03-22-2013
    Location
    Sterling, VA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Match string in one column, return value in same row, skip rows that down't match

    I have a data set where the column searched is always constant. I am trying to search the column for a specific string and return a value in the same row. I will use it for to return several different values. I tried several combinations of index and match but was not successful since the data is not a fixed amount of rows. It changes from time to time when the file is updated from an external program.

    I can't get my file to upload so here is an example of a before and after.

    Before:

    1 A
    2 A
    3 B
    4 C
    5 D
    6 A


    Output: When searching for A

    1 A 1
    2 A 2
    3 B 6
    4 C
    5 B
    6 C


    Output when search for B:

    1 A 3
    2 A 5
    3 B
    4 C
    5 B
    6 C

    I hope this is clear. Thanks in advance for your help.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Match string in one column, return value in same row, skip rows that down't match

    HI anil,

    Use below formula which need to be entered as array using key combination: ctrl shift enter

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    see attached:- match string in one column.xlsx

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    03-22-2013
    Location
    Sterling, VA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Match string in one column, return value in same row, skip rows that down't match

    Thank you for your response.

    I played around with what you have given and passed it into an index function to get the values that I needed.

    Cheers,
    Alex

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Match string in one column, return value in same row, skip rows that down't match

    Thanks Alex (Anil)

    Please mark this thread as [SOLVED] if your problem stands resolved.


    Regards,
    DILIPandey
    <click on below * if this helps>

+ 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