+ Reply to Thread
Results 1 to 6 of 6

Thread: single data column into multiple columns

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    single data column into multiple columns

    Hi - new to this forum
    I need a little help - i have a single column of data that contains multiple data sets of varying lengths. Each data set is separated by a space. so for example

    0.35
    0.33
    0.21

    0.20
    0.16
    1.61
    1.20
    0.08
    0.51

    0.37
    0.56
    0.70
    0.77
    0.85
    0.67

    I need this data separated into multiple columns such that it looks like the following (ignore the dots....i had to put these in)

    0.35 0.20 0.37
    0.33 0.16 0.56
    0.21 1.61 0.70
    ........1.20 0.77
    ........0.08 0.85
    ........0.51 0.67

    Does anyone know of a simple automated method to do this.......typically my single column of data could be 14000 cells long......

    Many thanks in advance

    Ian

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,224

    Re: single data column into multiple columns

    'COLUMNS TO ROWS
    Here's a macro for merging columns of data to one row matching for column A.


    There's a sample sheet you can drop your data into, or add the macro given to your own workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,224

    Re: single data column into multiple columns

    My apologies, I misread your request... you want Column To Columns, not Column to Rows.... here's a tweak on that macro for you:

    Option Explicit
    
    Sub ColumnToColumns()
    Dim i As Long, RNG As Range
    
    Application.ScreenUpdating = False
    Set RNG = Columns("A:A").SpecialCells(xlCellTypeConstants)
    
        For i = 2 To RNG.Areas.Count
            RNG.Areas(i).Cut Cells(1, Columns.Count).End(xlToLeft).Offset(, 1)
        Next i
    
    Set RNG = Nothing
    Application.ScreenUpdating = True
    End Sub
    Last edited by JBeaucaire; 02-07-2012 at 06:35 PM. Reason: removed column A delete command
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  4. #4
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,224

    Re: single data column into multiple columns

    Post #3 has been edited.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    02-07-2012
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: single data column into multiple columns

    Thanks so much - that seems to do the trick!!

  6. #6
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,224

    Re: single data column into multiple columns

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0