+ Reply to Thread
Results 1 to 5 of 5

Search a string from a column, and return multiple values

  1. #1
    Registered User
    Join Date
    08-10-2015
    Location
    Delhi, India
    MS-Off Ver
    MS Office 2013
    Posts
    7

    Question Search a string from a column, and return multiple values

    Hi,

    I have a long long list of users in a column A (some are in lastname, firstname format & some are in firstname lastname format, and some are probably different, they just have first name & last name in them in some format). I have another list where I have lastnames for users in column B.

    My requirement is: that I search each lastname(from column B) in column A and if there is a match (partial it will be I guess, and not exact) then return value(s) of column A, all in the same row as column B value is.

    I tried reading & implementing VLOOKUP, and also INDEX & MATCH however could not get things to work. Not sure if this will require to write a MACRO instead.

    Thanks for any pointers or help in advance. I am happy to do the hardwork, however need some guidance to start.

    Column A Column B Return1 Return2 Return3
    Taylor, Mike Vaughn Michael Vaughn
    Vaughn, Michael Taylor Taylor, Mike Taylor, Ross
    Taylor, Ross Vettory

    Regards,
    Rohit
    Last edited by newroads; 08-11-2015 at 06:16 PM.

  2. #2
    Registered User
    Join Date
    08-10-2015
    Location
    Delhi, India
    MS-Off Ver
    MS Office 2013
    Posts
    7

    Re: Search a string from a column, and return multiple values

    No replies :-(

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Search a string from a column, and return multiple values

    It's hard to read how your data is separated from the text. Upload an example worksheet showing what you have and what you want the final result to look like (Go Advanced>Manage Attachments)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    08-10-2015
    Location
    Delhi, India
    MS-Off Ver
    MS Office 2013
    Posts
    7

    Re: Search a string from a column, and return multiple values

    Thanks, here is the attachment.

    I want to search column B values for a partial match in column A, and if there are matches then that should be displayed in the same row eg. under column Return1, Return2, Return3 etc.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Search a string from a column, and return multiple values

    With your data in A8:B10, in C8 copied across and down, this ARRAYED Formula

    =IFERROR(INDEX($A$8:$A$10, SMALL(IF(ISNUMBER(SEARCH($B8,$A$8:$A$10)), ROW($A$8:$A$10)-ROW($A$8)+1), COLUMNS($A$1:A$1))),"")
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Script to Search for a specific String then return cell values above that String-4
    By owensjb2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2015, 01:28 AM
  2. [SOLVED] Script to Search for a specific String then return cell values above that String-3
    By owensjb2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2015, 01:50 PM
  3. [SOLVED] Script to Search for a specific String then return cell values above that String-2
    By owensjb2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-01-2015, 01:00 PM
  4. [SOLVED] Script to Search for a specific String then return cell values above that String
    By owensjb2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-01-2015, 11:28 AM
  5. [SOLVED] Return Multiple values from a column with index and match, and search criteria
    By marcusduton in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 02-15-2015, 09:59 PM
  6. [SOLVED] Search for multiple string values in the first row of a table and format column values.
    By Excel_junky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-12-2013, 12:48 PM
  7. Replies: 1
    Last Post: 07-26-2011, 06:48 AM

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