+ Reply to Thread
Results 1 to 9 of 9

String of text representing an array in one cell, vlookup each item, create new string

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    28

    String of text representing an array in one cell, vlookup each item, create new string

    Hello,

    I'm a basic user of excel and I wondered if you could help me. I would like to do the following:

    Using the attached data as an example, I want to take the string in column C (product codes) and create a string in column D (of product ID's) by looking up the individual product codes from column C (seperated by coma's) in column A and getting there relevant ID's from column B and creating a string that will sit in column D (seperated by colon's, no spaces).

    I would be greatful for any help with this as I am struggling on how to go about this.

    Thanks in advance.

    Paul

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: String of text representing an array in one cell, vlookup each item, create new string

    Please attach your excel file

    You posted the question twice.

    Please mark this one as solved.
    Last edited by oeldere; 08-07-2012 at 06:18 AM.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: String of text representing an array in one cell, vlookup each item, create new string

    Hello,

    Sorry about this, the system froze and I ended up posting twice, one with an attachment and one without. Here is the attachment for this post.

    Thanks.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: String of text representing an array in one cell, vlookup each item, create new string


  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: String of text representing an array in one cell, vlookup each item, create new string

    Quote Originally Posted by oeldere View Post
    Please attach your excel file

    You posted the question twice.

    Please mark this one as solved.
    Oeldere,

    Its better to report the post if its a duplicate specially caused due to a system issue. If its marked solved, it gives a different picture altogether and is not the right way to go.

    The duplicate thread has been deleted.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: String of text representing an array in one cell, vlookup each item, create new string

    How much data is in your real sheet compared to the example?

    The array formula that this would require would take considerable time to process with a large amount of data.

  7. #7
    Registered User
    Join Date
    08-07-2012
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: String of text representing an array in one cell, vlookup each item, create new string

    Hi Jason,

    In the real sheet there would be aproximatly 10000 or more rows.

    Thanks for your help.

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: String of text representing an array in one cell, vlookup each item, create new string

    This is the best I can come up with, I've used a UDF instead of arrays to make it run smoother.

    In the example attached you will see that the first 2 rows show a single part number instead of the required string, this number is missing from the list in column A so the formula is returning the problem part number for you to investigate, this can easily be changed if needed.

    example-data(1).xls

  9. #9
    Registered User
    Join Date
    08-07-2012
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: String of text representing an array in one cell, vlookup each item, create new string

    Hi Jason,

    Thats fantastic, perfect, exactly what I needed. I'm very happy with what you have done here.

    Looking at the UDF macro you have created I dont quite understand the terms used but I can just about understand what its doing.

    Not to worry about the ones that reference a code that doesnt exist in the list that wont happen in the real list and if it does then we need it to show up like that so that we can make any corrections any way.

    Thanks so much.

+ 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