+ Reply to Thread
Results 1 to 6 of 6

Expanding a comma deliminated file

  1. #1
    Registered User
    Join Date
    06-04-2007
    Posts
    61

    Expanding a comma deliminated file

    I am currently exporting a table from a DB in which the information (Marketing Criteria) I want is comma deliminated. I also have another table that is exported to another tab that has a description for each value.

    What i am looking to do is to create a third sheet that list out all products and each Marketing Criteria on a seperate line.

    ie
    Sheet 1
    A1 - apple B1 - 1,2,3,4,5

    Sheet 2
    A1 - 1 B1 - aaa
    A2 - 2 B1 - bbb
    A3 - 3 B1 - ccc
    A4 - 4 B1 - ddd
    A5 - 5 B1 - eee

    Sheet 3
    A1 - apple B1 - aaa
    A1 - apple B1 - bbb
    A1 - apple B1 - ccc
    A1 - apple B1 - ddd
    A1 - apple B1 - eee

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,406
    In your examples, which sheets contain the data output by the DB program, and which sheet represents your "compiled" information.

  3. #3
    Registered User
    Join Date
    06-04-2007
    Posts
    61
    Sheet 1 - is a DB export containing the comma deliminated information
    Sheet 2 - is a DB export containing the description of each value pulled in Sheet 1
    Sheet 3 - is the combined sheet seperating out each product and each Marketing Criteria seperately

  4. #4
    Registered User
    Join Date
    06-04-2007
    Posts
    61
    Has anyone got an idea on this?

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,406
    I doubt this will be good enough, but maybe it will get the ball rolling.

    My first thought for this goes something like this:

    Use Text to Columns command to parse Sheet1!B1 so each integer is in its own cell.
    Arranging Sheet3 horizontally instead of vertically, put a simple VLOOKUP formula in a2 through e2 =VLOOKUP(sheet1!b1,sheet2!$a$1:$b$5,2). A1:E1 would be =sheet1!A1

    Specify how this does and doesn't work, and we'll see what else we can come up with.

  6. #6
    Registered User
    Join Date
    06-04-2007
    Posts
    61
    What if the field contains "-" such as 1,3,5,7-9? How do you account for the 8?

+ 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