+ Reply to Thread
Results 1 to 4 of 4

copying a range to first empty row is copying over data

Hybrid View

  1. #1
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: copying a range to first empty row is copying over data

    Maybe like this (untested):
    Sub test3()
        Dim x       As Long
        Dim y       As Long
        Dim wksFr   As Worksheet
        Dim wksTo   As Worksheet
    
        Set wksFr = Workbooks("Recon Builder.xls").Worksheets("JEs")
    
        Workbooks.Open Filename:="M:\aaclosing\2008\test\Funding Entries.xls"
        Set wksTo = ActiveWorkbook.Worksheets("Funding Entries")
    
        x = wksFr.Cells(Rows.Count, "A").End(xlUp).Row
        y = wksTo.Cells(Rows.Count, "A").End(xlUp).Row + 1
    
        wksFr.Range("A2:G" & x).Copy
        wksTo.Cells(y, "A").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
                                         SkipBlanks:=False, Transpose:=False
    End Sub
    Entia non sunt multiplicanda sine necessitate

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

    Re: copying a range to first empty row is copying over data

    Thank you very much, works like a charm. Sir, I owe you a great debt of gratitude.

+ 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