Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Dec 2001
    Posts
    174
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sort of 'transpose' (excel97+)

    I am trying to write a macro to produce required output --pls see attachment
    Could the output start 5 lines below last input row and if some still has the patience show me how to output the data to new file(new workbook) and new sheet in the same original workbook.
    Thanx
    Smbs
    Attached Files Attached Files

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort of 'transpose' (excel97+)

    This should do what you are asking:

    <pre>Public Sub TransTab()
    Dim lRows As Long, I As Long, J As Long, K As Long
    lRows = Worksheets("Sheet1").Range("A65536").End(xlUp).Row
    K = lRows + 5
    With Worksheets("Sheet1").Range("A1")
    For I = 1 To lRows - 1
    For J = 0 To 7
    .Offset(K, 0).Value = .Offset(0, J).Value & .Offset(I, J).Value
    K = K + 1
    Next J
    K = K + 1
    Next I
    End With
    End Sub
    </pre>

    Legare Coleman

  3. #3
    2 Star Lounger
    Join Date
    Dec 2001
    Posts
    174
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort of 'transpose' (excel97+)

    great thanx for quick response!!
    Smbs

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •