+ Reply to Thread
Results 1 to 6 of 6

Thread: transposing data

  1. #1
    Registered User
    Join Date
    10-20-2011
    Location
    Pittsburgh PA
    MS-Off Ver
    Excel 2007
    Posts
    2

    transposing data

    I have data that looks like...

    1 2 3 4 5 6
    7 8 9 10 11 12
    13 14 15 16 17 18

    I want it all in one column like....

    1
    2
    3
    4
    5
    6
    7
    8 etc How do I do this? Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    892

    Re: transposing data question

    every number in separate cells or every number from one row in one cell?
    Last edited by tom1977; 10-20-2011 at 05:33 PM.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007
    Posts
    615

    Re: transposing data question

    see attatchment
    Attached Files Attached Files
    Azam
    If you want to say Thank you to a member, click the reputation icon (Star) in the left bottom of the post.
    For prompt answer, be descriptive, concise, short, direct, and to-the-point.

  4. #4
    Valued Forum Contributor
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    892

    Re: transposing data question

    You can use such code:
    Sub aa()
    Dim myrange As Range
    Dim os As Integer
    Dim ka As Variant
    Columns("h").ClearContents
    Set myrange = Cells(1, 1).CurrentRegion
    myrange.Select
    os = Cells(Rows.Count, "H").End(xlUp).Row
    For Each ka In myrange
    If Not IsEmpty(ka.Value) Then
    os = os + 1
    Range("h" & os - 1) = ka.Value
    End If
    Next
    End Sub
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  5. #5
    Registered User
    Join Date
    10-20-2011
    Location
    Pittsburgh PA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: transposing data question

    Thanks everybody. The numbers are in different cells. Azam your formula works if the numbers range from low to high. However, actually the numbers are a bit random (high then low then high etc). Your formula seems to work only if the numbers range from low to high. So in actuality the numbers are 1 to 24 across (hours) then 1 to 365 days down. I want one column 1 to 24 for all 365 days. I am an excel novice and your help is much appreciated. So I now have
    1 5 10 4 6 9 10
    5 12 15 89 3 55
    9 11 3 10 12 1

    I want it all in one column like....

    1
    5
    10
    4
    6
    9
    10
    5
    12
    15
    89
    3
    etc
    How do I do this? Thanks.

  6. #6
    Valued Forum Contributor
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    892

    Re: transposing data question

    If You want formula You can start with one from attachment
    Attached Files Attached Files
    Last edited by tom1977; 10-21-2011 at 05:08 PM.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

+ 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