+ Reply to Thread
Results 1 to 4 of 4

Need to split entries from one long column into 5 columns

  1. #1
    Registered User
    Join Date
    09-28-2013
    Location
    San Antonio, Texas
    MS-Off Ver
    Excel 2010
    Posts
    36

    Need to split entries from one long column into 5 columns

    I've been working on something for hours and I can't figure out how to do it. I have one long column (nearly 500 entries). What I want to do, if possible, is to change the data presentation to 5 columns, with every fifth entry starting a new row. What is now column A1-A500 would move the first five entries of that row (original entries A1,A2,A3,A4,A5) to be in cols A1,B1,C1,D1,E1, then take the original A6 and start the next row where there would be original entries, A6,A7,A8,A9,A10 placed into cells A2,B2,C2,D2,E2, and so on. My first though was to "flag" all of col A in Col B with a series of 1,2,3,4,5,1,2,3,4,5, etc. and then use a series of "if" statements. Then all the original col A entries flagged with a "1" in col B would be the first entry in a series of rows starting somewhere to the right. All the flagged "2"s would be the second column of the new table, etc. But I can't make that work like it want it to.

    I have set up and attached a shortened dummy table showing what I have, with the flags. My data is in col A and the flags in col B. What I want to have happen begins in col D, just for display purposes (I don't yet have the correct formulas putting the data there). Any ideas? Is there a shorter, simpler way to get this done? Were the flags a wrong approach? Thanks everyone!
    Attached Files Attached Files

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need to split entries from one long column into 5 columns

    I didn't download your file.

    Is this what you want to do:

    Data Range
    A
    B
    C
    D
    E
    F
    G
    1
    1
    1
    2
    3
    4
    5
    2
    2
    6
    7
    8
    9
    10
    3
    3
    4
    4
    5
    5
    6
    6
    7
    7
    8
    8
    9
    9
    10
    10
    11
    ------
    ------
    ------
    ------
    ------
    ------
    ------


    This formula entered in C1:

    =INDEX($A$1:$A$10,(ROWS(A$1:A1)-1)*5+COLUMNS($A1:B1)-1)

    Copy across to G1 then down as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Need to split entries from one long column into 5 columns

    Hi Kim,

    See if the attached works for you.

    In E5 put this formula, then pull it across and down.

    =INDIRECT("B"&4 + 5*(ROWS(E$5:E5)-1) + COLUMNS($E1:E1))
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    01-30-2015
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    31

    Re: Need to split entries from one long column into 5 columns


+ 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. Removing repeat entries in a long column of data entries
    By kaizhong1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-15-2010, 01:31 PM
  2. How can I ensure entries in a column are 16 chars long using spaces?
    By compact in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-18-2007, 06:11 AM
  3. Rows and columns to one long column
    By kasenator in forum Excel General
    Replies: 3
    Last Post: 06-20-2007, 03:03 PM
  4. Replies: 0
    Last Post: 07-31-2006, 12:13 PM
  5. Replies: 2
    Last Post: 03-07-2006, 04:46 PM

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