Results 1 to 11 of 11

Change range of cells within VBA macro and copy and paste to fixed cell range

Threaded View

  1. #1
    Registered User
    Join Date
    07-18-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    5

    Change range of cells within VBA macro and copy and paste to fixed cell range

    I have to following code:

    For i = 40 To 41
    value = i
    
        'Range("C41:F41").Select  ------------------------------> Basically want to change this range every time in the loop from C41:F41 to C42:F42, C43:F43 uptil C57:F57.
        Range(Cells(3, i), Cells(6, i)).Select ---------------------> Used this to do it but the paste rows C26:F26 show up as empty cells
        Selection.Copy
        Range("C26:F26").Select
        ActiveSheet.Paste
    
        Next i
        
    End Sub
    How can I accomplish this?
    Last edited by Cutter; 07-20-2012 at 11:44 AM. Reason: Added 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