Results 1 to 2 of 2

Copy and paste to the next empty column

Threaded View

  1. #1
    Registered User
    Join Date
    12-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    51

    Copy and paste to the next empty column

    Hi guys

    Could someone please help me amend the below code? Basically I need to be able to copy and paste data into the next empty cell in sheet(archive). I regularly enter new data in sheet(new) and my macro below is overriding my previous data in sheet(archive)

    Sub movedata()
        Dim i As Long
        Dim WB2 As Worksheet: Set WB2 = Sheets("New")
        Dim WB3 As Worksheet: Set WB3 = Sheets("Archive")
        
        For i = 1 To 13
            With WB2
                If Application.WorksheetFunction.IsText(.Cells(39, i)) Then
                    .Range(.Cells(13, i), .Cells(39, i)).Copy Destination:=WB3.Cells(2, i)
                End If
            End With
        Next i
    
    End sub


    thanks
    Last edited by ConfusedaboutVBA; 01-01-2013 at 07:37 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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