Results 1 to 6 of 6

Visual Basic: looping a copy / paste and transpose function

Threaded View

Frey Visual Basic: looping a copy... 06-08-2012, 10:50 AM
gmk Re: Visual Basic: looping a... 06-08-2012, 12:24 PM
gmk Re: Visual Basic: looping a... 06-08-2012, 01:11 PM
Frey Re: Visual Basic: looping a... 06-11-2012, 04:41 AM
gmk Re: Visual Basic: looping a... 06-11-2012, 06:33 AM
Frey Re: Visual Basic: looping a... 06-11-2012, 08:25 AM
  1. #1
    Registered User
    Join Date
    06-08-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    14

    Visual Basic: looping a copy / paste and transpose function

    Hello to everybody,

    I have an excel sheet in which the diagonal cells (B3, C4, D5, E6 ecc ecc) are locked.

    I want to copy from C3 to M3, than paste (values) and transpose on from cell B4 to B12.

    I recorded a macro that does this
    Sub Macro2()
    
    Macro2 Macro
    
        Range("C3:M3").Select
        Selection.Copy
        Range("B4").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=True
    
    End Sub
    but I am not able to programme the code in order to execute a second action starting this time from range "D4:M3" and paste/transpose to cell C5.

    I would like to loop this action untill cell M11 and copy paste only that last single cell in L14 (this is an example, I have to this for hundreds of rows actually....)

    I tried some loop commands but the action goes on infinitely without skipping the diagonal cells and moeover without stopping.

    Thank you it would be great to receive a visual basic code!
    Last edited by arlu1201; 06-08-2012 at 02:46 PM. Reason: Use code tags.

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