+ Reply to Thread
Results 1 to 4 of 4

Break long column into a specified number of rows

  1. #1
    Registered User
    Join Date
    06-03-2015
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    2

    Break long column into a specified number of rows

    I have 1 column with about 31,000 rows. I need to break this up into rows that contain exactly 96 columns.


    On a smaller scale it would look like this:

    1 _ 1 2 3
    2 _ 4 5 6
    3 _ 7 8 9
    4 _
    5 _
    6 _
    7 _
    8 _
    9 _


    The closest I've come is by using an offset formula: =OFFSET($A$1,(ROW()-2)*96+INT((COLUMN()-3)),MOD(COLUMN()-3,1))

    but after 10 rows it starts to revert back to the first value.

    I'm not sure the best way to do this.

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

    Re: Break long column into a specified number of rows

    Hi, welcome to the forum

    Try this...
    A
    B
    C
    D
    E
    1
    3
    2
    1
    1
    2
    3
    3
    2
    4
    5
    6
    4
    3
    7
    8
    9
    5
    4
    0
    0
    0
    6
    5
    0
    0
    0
    7
    6
    0
    0
    0
    8
    7
    0
    0
    0
    9
    8
    10
    9

    B1=the number of columns you want
    C2=IF(COLUMN(A1)>$B$1,"",OFFSET($A$1,(ROW($A1)-1)*$B$1+COLUMN(A1),0))
    copied down and across as needed
    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

  3. #3
    Registered User
    Join Date
    06-03-2015
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    2

    Re: Break long column into a specified number of rows

    Thank you very much. I don't quite understand how the offset formula works but this seems to have given me the data the way i need it formatted. Thank you for your quick response!

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

    Re: Break long column into a specified number of rows

    You are welcome.

    If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

+ 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. Replies: 0
    Last Post: 04-15-2013, 04:38 PM
  2. [SOLVED] Count Duplicates in Column A once as long as there is a number higher than 0 in Column B
    By armbands1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2013, 01:46 AM
  3. [SOLVED] (How to) Transpose one long list of numbers in CSV file to a number of rows
    By sfmatt13 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-30-2012, 07:35 PM
  4. Transpose a few rows of a very long column
    By mchapman47 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-27-2012, 01:43 PM
  5. Rows and columns to one long column
    By kasenator in forum Excel General
    Replies: 3
    Last Post: 06-20-2007, 03: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