+ Reply to Thread
Results 1 to 7 of 7

Break list into separate rows

  1. #1
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Break list into separate rows

    Cannot think of a formula way to do this, pretty sure it needs VBA.

    (this is for my mother-in-law, so I really need help LOL)

    OK, this is for a raffle, and we have a list if ticket numbers, along with who bought the ticket, and the rest of their info. That would be simple enough, but some people bought multiple tickets, and all their ticket numbers are in 1 cell, and the rest of their info is on that same line.

    A
    B
    C
    D
    E
    F
    G
    1
    Gift Reference
    Name Preferred County Preferred Address Line 1 Preferred Address Line 2 Preferred City_ State Home Number
    2
    0
    aa aa1 aa2 aa3 aa4 aa5
    3
    3
    bb bb1 bb2 bb3 bb4 bb5
    4
    4
    cc cc1 cc2 cc3 cc4 cc5
    5
    7
    dd dd1 dd2 dd3 dd4 dd5
    6
    12
    ee ee1 ee2 ee3 ee4 ee5
    7
    013, 113, 213, 313, 413, 513, 613, 713, 813, 913
    ff ff1 ff2 ff3 ff4 ff5
    8
    14
    gg gg1 gg2 gg3 gg4 gg5
    9
    15
    hh hh1 hh2 hh3 hh4 hh5
    10
    16
    ii ii1 ii2 ii3 ii4 ii5
    11
    17
    jj jj1 jj2 jj3 jj4 jj5
    12
    018, 387, 969
    kk kk1 kk2 kk3 kk4 kk5
    13
    19
    ll ll1 ll2 ll3 ll4 ll5


    There are 1000 tickets, above is a (modified) sample.

    What I need to do is for those who have multiple tickets, each ticket needs to be in it's own row, and each row needs to have that person's info. Any missing numbers need to be added using a blank row

    A
    B
    C
    D
    E
    F
    G
    1
    Gift Reference
    Name Preferred County Preferred Address Line 1 Preferred Address Line 2 Preferred City_ State Home Number
    2
    0
    aa aa1 aa2 aa3 aa4 aa5
    3
    3
    bb bb1 bb2 bb3 bb4 bb5
    4
    4
    cc cc1 cc2 cc3 cc4 cc5
    5
    7
    dd dd1 dd2 dd3 dd4 dd5
    6
    12
    ee ee1 ee2 ee3 ee4 ee5
    7
    13
    ff ff1 ff2 ff3 ff4 ff5
    8
    113
    ff ff1 ff2 ff3 ff4 ff5
    9
    213
    ff ff1 ff2 ff3 ff4 ff5
    10
    313
    ff ff1 ff2 ff3 ff4 ff5
    11
    and so on, down
    12
    14
    gg gg1 gg2 gg3 gg4 gg5
    13
    15
    hh hh1 hh2 hh3 hh4 hh5
    14
    16
    ii ii1 ii2 ii3 ii4 ii5
    15
    17
    jj jj1 jj2 jj3 jj4 jj5
    16
    018, 387, 969
    kk kk1 kk2 kk3 kk4 kk5
    17
    19
    ll ll1 ll2 ll3 ll4 ll5


    Then for the extra 10 points, I need the list sorted by ticket number

    My instructions have been...
    There should be in column A - the ticket numbers from 000 to 999. The unsold tickets are missing from this list so we need to insert a line for them. The lines that have multiple numbers ( like 018, 387, 969) each need a separate line in the correct sequence of numbers with the information included
    Attached is a sample file
    Attached Files Attached Files
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: Break list into separate rows

    hmm OK I think I managed to solve this with formulas after all.

    1. on a new sheet, column A, created a list of (real) numbers from 0 to 999
    2. B2=IFERROR(INDEX(Ticketholders!B:B,IFERROR(MATCH("*"&TEXT($A2,"000")&"*",Ticketholders!$A:$A,0),MATCH($A2,Ticketholders!$A:$A,0))),"")
    copied down and across

    Would still be interested in a VBA option though

  3. #3
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Break list into separate rows

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: Break list into separate rows

    That looks like it does what she needs, thanks a bunch

    Actual sheet names are Ticketholders and (my newly created) Sorted List, so I would just need to adjust for those in the code?

    Please Login or Register  to view this content.
    Correct?

  5. #5
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Break list into separate rows

    You are welcome, thanks for the reps.

    On this line, it should be :
    Please Login or Register  to view this content.
    because we are copying the header from Ticketholders!A1:G1
    Last edited by karedog; 05-02-2017 at 11:31 PM.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: Break list into separate rows

    aahh OK, yes, I see that now, thanks again

  7. #7
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Break list into separate rows

    Glad I can help

    Regards

+ 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. Looking for a macro to break out multiple numbers in one cell into separate rows
    By elbertta in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-26-2015, 05:58 PM
  2. Creating separate sheets based on single rows in list?
    By Taxster in forum Excel General
    Replies: 3
    Last Post: 12-16-2014, 04:24 PM
  3. [SOLVED] Pulling rows from a master list into separate pages
    By Maddyp in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-04-2013, 02:00 PM
  4. Break Down Comma Separate Values
    By sod_hector in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-08-2009, 01:25 PM
  5. Separate Table Data and List Groups in Rows
    By Scott.h in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2008, 07:57 AM
  6. Replies: 3
    Last Post: 02-05-2008, 11:13 AM
  7. Break up strings into separate cells
    By al007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2005, 07:20 PM

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