+ Reply to Thread
Results 1 to 3 of 3

tranpose vertical data horizontally

Hybrid View

  1. #1
    Registered User
    Join Date
    11-17-2009
    Location
    Houston
    MS-Off Ver
    Excel 2007
    Posts
    2

    tranpose vertical data horizontally

    First of all I would just like to say I am a total novice compared to the people on this forum and I would really appreciate any help I can get.

    I need to transpose vertical data horizontally exactly like the transpose function performs it, however I have 2400 unique ID's. Each "ID" has 150 data points (each data point in the same column but seperate row...) that need to be tranposed horizontally (in the same row different column).

    Is there a way I can avoid performing the transpose 2400 times?
    Last edited by southstar99; 11-17-2009 at 01:50 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: tranpose vertical data horizantally

    I am assuming you want a VBA solution given formulae based solution would be very inefficient (360,000 calcs)

    You don't specify ranges etc but if we assume source data in A1:A360000 to be transposed into B1:EU2400 then:

    Public Sub Example()
    Dim lngRow As Long
    Application.ScreenUpdating = False
    For lngRow = 1 To 360000 Step 150
        Cells(1 + CLng(lngRow / 150), "B").Resize(, 150).Value = Application.Transpose(Cells(lngRow, "A").Resize(150))
    Next lngRow
    Application.ScreenUpdating = True
    End Sub

  3. #3
    Registered User
    Join Date
    11-17-2009
    Location
    Houston
    MS-Off Ver
    Excel 2007
    Posts
    2

    Thumbs up Re: tranpose vertical data horizontally

    Thanks Donkey,

    Sorry for not specifying. I had to tweak it a bit but your solution worked great! Thank you so much!
    Last edited by southstar99; 11-17-2009 at 01:49 PM.

+ 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