+ Reply to Thread
Results 1 to 7 of 7

split cell contents into rows, and copy adjacent cells down

  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,936

    split cell contents into rows, and copy adjacent cells down

    I have a file (from my MiL) that has tickets people have bought, along with some of their details. Problem is, when someone has bought more than 1 ticket, all the numbers were entered into 1 cell...
    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    Gift Reference Name Last Name First Name Preferred County Preferred Address Line 1 Preferred City_ State Preferred ZIP Gift Amount
    2
    4
    Janie P. C
    3
    005, 006, 007, 008 Kellie M.
    4
    12
    Tina LaRoc
    5
    015, 445 Gretchen Y
    6
    16
    Diane M. P
    7
    17
    Raymond M.
    8
    18
    David J. D
    9
    19
    Daniel B.
    10
    21
    Linda Schr
    11
    23
    David Jing
    12
    024, 955 Debra Dell
    13
    28
    William E.
    14
    29
    Robert Gri
    15
    31
    Scott Crof
    16
    32
    Kate Kilco
    17
    34
    Mark Wohle
    18
    035, 130, 314 Edward Min
    19
    36
    Robert J.
    20
    37
    Donald Dev


    What she needs is to have - where applicable - each number broken out into it's own row, along with all the rest of the pertinent data, something like this...
    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    Gift Reference Name Last Name First Name Preferred County Preferred Address Line 1 Preferred City_ State Preferred ZIP Gift Amount
    2
    4
    Janie P. C
    3
    5
    Kellie M.
    4
    6
    Kellie M.
    5
    7
    Kellie M.
    6
    8
    Kellie M.
    7
    12
    Tina LaRoc
    8
    15
    Gretchen Y
    9
    445
    Gretchen Y
    10
    16
    Diane M. P
    11
    17
    Raymond M.


    I guess I could probably work out some formula with helpers and stuff, but this is more suited to VBA.

    Any takers?

    Dummy file available, if needed, but I figured this would show what I need. There are almost 1 000 rows of this (there were 1000 tickets), and I *think* the tecket numbers need to be 3 digits...001, 002 etc
    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
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: split cell contents into rows, and copy adjacent cells down

    Try running this:
    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  3. #3
    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,936

    Re: split cell contents into rows, and copy adjacent cells down

    That looks like it does exactly what she needs, thank you (scored some brownie points with MiL and wife)

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: split cell contents into rows, and copy adjacent cells down

    Beaten to the draw... a sllghtly shorter procedure, but uses/modifies the source sheet which, in hindsight, is probably not the best option.
    Please Login or Register  to view this content.
    (but I didn't notice 'The tickets need to be '000' so it needs a format on Col A)
    Last edited by cytop; 05-14-2016 at 02:14 PM.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: split cell contents into rows, and copy adjacent cells down

    Manged with firefox. There is a button on sheet1.
    Attached Files Attached Files
    Last edited by AB33; 05-14-2016 at 02:46 PM.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: split cell contents into rows, and copy adjacent cells down

    Ford, here is another. I'm a little slower than the others

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  7. #7
    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,936

    Re: split cell contents into rows, and copy adjacent cells down

    Thanks guys

+ 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. [SOLVED] VBA Split Cell Contents to New Rows & Copy Cells containing single values to the new rows
    By jaimelwilson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-14-2017, 05:30 PM
  2. [SOLVED] Split cell contents into one/multiple rows
    By sbabu16 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-16-2015, 07:19 AM
  3. Replies: 3
    Last Post: 11-28-2011, 03:08 PM
  4. Split a cell into adjacent cells
    By contactprabha in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-03-2011, 05:26 AM
  5. Conditionally copy selected cells in rows depending on cell contents.
    By danando in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2011, 08:50 PM
  6. Split cell contents over multiple rows based on cell contents
    By naigy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-17-2011, 05:38 PM
  7. Replies: 1
    Last Post: 03-18-2008, 07:03 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