+ Reply to Thread
Results 1 to 2 of 2

Separating information belonging to an individual

  1. #1
    Registered User
    Join Date
    09-10-2003
    Location
    London, UK
    Posts
    38

    Separating information belonging to an individual

    Hi,

    Can anyone assist with the following, please:

    I need to separate information within columns so that I can return data belonging to an individual, for instance:

    A B
    Fred Oranges
    Jim Apples
    Alfred Bananas
    Jim Cucumbers
    Dave Carrots

    I am using a Vlookup to return items, however I just need to return the results in this instance for Jim so that I can say Jim has Apples and Cucumbers. I know I can easily get a return from Vlookup for one item, which is where I'm currently at - it's just getting any remaining items for Jim that I'm having difficulty with.

    Grateful for any thoughts.

    Thanks,
    Dan.

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Separating information belonging to an individual

    Hi,

    Assuming that the data you give is in the range A2:B5, and that the name for which you wish to return the matches (e.g. "Jim") is in cell C1, enter this array formula in cell C2 and copy down until you start to see blanks:

    =IFERROR(INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=C$1,ROW($A$2:$A$6)-MIN(ROW($A$2:$A$6))+1),ROWS($1:1))),"")

    Were you to enter further names in cells D1, E1, F1, etc., then this formula, copied across and again down, would give you the respective results for those people also.

    Note that a solution in which matches are returned in separate columns, such as this one, is readily achievable. However, if you are insistent that matches are concatenated into a single string within one cell then this is not so straightforward and would be best achieved using VBA.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    09-10-2003
    Location
    London, UK
    Posts
    38
    Hi,

    Thanks very much for your detailed response, I think this will be exactly what I'm looking for.

    Thanks again,
    Dan.

  4. #4
    Registered User
    Join Date
    09-10-2003
    Location
    London, UK
    Posts
    38
    Hi,

    Thanks very much for your detailed response, I think this will be exactly what I'm looking for.

    Thanks again,
    Dan.

+ 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. Separating data into individual sheets
    By excelforum911 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-24-2012, 12:06 PM
  2. Separating information
    By oMaryMary in forum Excel General
    Replies: 5
    Last Post: 01-18-2012, 07:12 PM
  3. Separating information within the cell
    By charlie11k in forum Excel General
    Replies: 1
    Last Post: 07-20-2009, 08:28 PM
  4. Separating text in one cell into individual cells
    By Hblbs in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-22-2009, 10:42 AM
  5. Separating Information in Cells
    By xKylex in forum Excel General
    Replies: 9
    Last Post: 08-07-2007, 07:32 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