+ Reply to Thread
Results 1 to 3 of 3

Pasting A Range Into Next Available Row

  1. #1
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Pasting A Range Into Next Available Row

    Hello,

    I am getting a compile error when I run the following code in a file I am building. I am not sure what I am doing wrong in the code to get the compile error. The line with the range that I want to copy is A80 through the named ranged AdjustmentEnd1. I then want it to search down column A and find the first unused line from the bottom and paste the copied selection in. Any help would be much appreciated. Thanks!

    <code>
    Sub AddAdjustment()
    Range("A80", Range("AdjustmentEnd1")).Copy
    Range("A1").Select
    Range("A" & Rows.Count).End(xlUp).Offset(1).Select
    .PasteSpecial xlPasteAll
    .PasteSpecial xlPasteColumnWidths
    Application.CutCopyMode = True
    End Sub
    <code>

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Pasting A Range Into Next Available Row

    try
    Please Login or Register  to view this content.
    Last edited by tehneXus; 05-14-2013 at 04:59 PM.
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: Pasting A Range Into Next Available Row

    works like a charm. Thanks!

+ Reply to Thread

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