+ Reply to Thread
Results 1 to 4 of 4

Transposing rows of data into columns of data

Hybrid View

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Transposing rows of data into columns of data

    Hi,

    I am trying to get large date into a specific format.

    I have attached the example..

    Sample23.xlsx

    I have delimited the numbers to columns making a large number of columns.. I have over 3500 numbers in one cell.

    Is there a easy way out? I am noob to excel and not sure how it will work out.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Transposing rows of data into columns of data

    Try this

    Sub abc()
     Dim i As Long, ii As Long, n As Long
     Dim a, x, aValues
     
     ReDim aValues(1 To Rows.Count, 1 To 3)
     With ActiveSheet
        a = .Range("a3", .Cells(Rows.Count, "c").End(xlUp))
        For i = 1 To UBound(a)
            x = Split(a(i, 2), ",")
            For ii = LBound(x) To UBound(x)
                n = n + 1
                aValues(n, 1) = a(i, 1)
                aValues(n, 2) = x(ii)
                aValues(n, 3) = a(i, 3)
            Next
        Next
     End With
     Worksheets.Add
     With Range("a1").Resize(n, UBound(aValues, 2))
        .Value = aValues
        .Borders.LineStyle = xlContinuous
     End With
     
    End Sub
    Last edited by mike7952; 10-26-2012 at 11:38 AM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Transposing rows of data into columns of data

    thanks a bunch.. it solved the problem

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,813

    Re: Transposing rows of data into columns of data

    There is a formula-based solution to a similar problem in post #7 of this thread:

    http://www.excelforum.com/excel-gene...html?p=2951411

    Hope this helps.

    Pete

+ 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.6.0 RC 1