Results 1 to 2 of 2

copying rows to first empty rows in different workbook

Threaded View

  1. #1
    Registered User
    Join Date
    06-05-2009
    Location
    Charlotte
    MS-Off Ver
    Excel 2007
    Posts
    19

    copying rows to first empty rows in different workbook

    I'm having trouble with a macro I've pieced together. It is only copying the first row of data from my source file to the first blank row in my destination file. It needs to copy all data from rows 2 through 30 in my source file ( that contain data) to the appropriate blank rows in my destination file. Anybody see my error? I can't seem to figure this out. The macro is building a batch file that I'll use once a day to upload into our system. The source file is pushing unique data to the destination file.

    Thanks in advance, JS


    Sub jetransfer()
    '
    ' jetransfer Macro
    '
    
    'open wkb
        Workbooks.Open Filename:="M:\aaclosing\2008\test\Funding Entries.xls"
        Windows("Recon Builder.xls").Activate
        
    'transfer rows
    
    Sheets("JEs").Select
     ' Find the last row of data
        FinalRow = Range("A30").End(xlUp).Row
        ' Loop through each row
        For X = 2 To FinalRow
                Range("A" & X & ":G" & X).copy
        Windows("Funding Entries.xls").Activate
        Sheets("Funding Entries").Select
                NextRow = Range("A30").End(xlUp).Row + 1
                Range("A" & NextRow).Select
                Windows("Funding Entries.xls").Activate
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
                Sheets("Funding Entries").Select
      
        Next X
    
    End Sub
    Last edited by jseufert; 08-12-2009 at 09:50 AM.

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