+ Reply to Thread
Results 1 to 3 of 3

Transpose-run a piece of code

Hybrid View

  1. #1
    Darius
    Guest

    Transpose-run a piece of code

    I am not a programmer, but can anybody help me on this:

    I have data in one worksheet, in:
    C9-c13
    C15-C19
    C21-C25
    C27-C31
    ..
    ..
    C8319-C8323
    C8325-C8329

    Now I want to run a piece of code which transpose these data as put data
    like this:
    G2-K2
    G3-K3
    G4-K4
    ..
    ..
    Can anybody please help.


  2. #2
    Harald Staff
    Guest

    re: Transpose-run a piece of code

    Hi

    Run this little thing:

    Sub Transp()
    Dim L As Long, i As Long, R As Long
    R = 2
    For L = 9 To 8329 Step 6
    For i = 0 To 4
    Cells(R, 7 + i).Value = Cells(L + i, 3).Value
    Next
    R = R + 1
    Next
    End Sub

    HTH. Best wishes Harald

    "Darius" <Darius@discussions.microsoft.com> skrev i melding
    news:C0095A9A-37D0-4923-985C-32485DAEBB84@microsoft.com...
    > I am not a programmer, but can anybody help me on this:
    >
    > I have data in one worksheet, in:
    > C9-c13
    > C15-C19
    > C21-C25
    > C27-C31
    > .
    > .
    > C8319-C8323
    > C8325-C8329
    >
    > Now I want to run a piece of code which transpose these data as put data
    > like this:
    > G2-K2
    > G3-K3
    > G4-K4
    > .
    > .
    > Can anybody please help.
    >




  3. #3
    Darius
    Guest

    re: Transpose-run a piece of code

    Thanks
    saved me

    "Harald Staff" wrote:

    > Hi
    >
    > Run this little thing:
    >
    > Sub Transp()
    > Dim L As Long, i As Long, R As Long
    > R = 2
    > For L = 9 To 8329 Step 6
    > For i = 0 To 4
    > Cells(R, 7 + i).Value = Cells(L + i, 3).Value
    > Next
    > R = R + 1
    > Next
    > End Sub
    >
    > HTH. Best wishes Harald
    >
    > "Darius" <Darius@discussions.microsoft.com> skrev i melding
    > news:C0095A9A-37D0-4923-985C-32485DAEBB84@microsoft.com...
    > > I am not a programmer, but can anybody help me on this:
    > >
    > > I have data in one worksheet, in:
    > > C9-c13
    > > C15-C19
    > > C21-C25
    > > C27-C31
    > > .
    > > .
    > > C8319-C8323
    > > C8325-C8329
    > >
    > > Now I want to run a piece of code which transpose these data as put data
    > > like this:
    > > G2-K2
    > > G3-K3
    > > G4-K4
    > > .
    > > .
    > > Can anybody please help.
    > >

    >
    >
    >


+ 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