+ Reply to Thread
Results 1 to 5 of 5

Split one row into multiple rows

  1. #1
    Registered User
    Join Date
    01-31-2011
    Location
    Islamabad, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    23

    Split one row into multiple rows

    Hi,

    I have data like this

    Data in Row 1 (one value per cell)

    1 2 3 4 5 6 ....................32

    I want to split data in each row into 8 rows. i.e. after the split each row should contains 4 values. The output should be like this
    1 2 3 4
    5 6 7 8
    9 10 11 12
    13 14 15 16
    .
    .
    .
    29 30 31 32


    I have data in 100 rows thus the output should be 1 row split in 8 rows x 100 = 800 rows

    Thanks in advance.

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

    Re: Split one row into multiple rows

    Try this code
    Please Login or Register  to view this content.
    Put it in a standard module.
    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]

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Split one row into multiple rows

    Or maybe a formula approach?

    With your data in row 1
    In A3
    Please Login or Register  to view this content.
    Drag Across to D3 (or further), and then Down until blanks are returned.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    01-31-2011
    Location
    Islamabad, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Split one row into multiple rows

    @ arlu1201: The Code solution worked. Thank you very much for your kind help.

    @Marcol: Unfortunately formula did not produced the desired results. I have values 32 Values in Row 1 and Total 100 rows (each row contains 32 values).

    Thanks again.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Split one row into multiple rows

    Apologies I just read the thread title, and didn't fully read your question, .
    Last edited by Marcol; 05-28-2012 at 11:44 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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