+ Reply to Thread
Results 1 to 6 of 6

Copy Paste range to first empty row

  1. #1
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Copy Paste range to first empty row

    I am trying and failing to copy a range (AB34:AT34) from the worksheet (Enrolment Form) where the macro is fired from, select another worksheet (Database1), find the first empty cell in column A, and paste special.

    [HTML][/Private Sub CommandButton4_Click()

    Range("AB34:AT34").Select
    Selection.Copy
    Worksheets("Database1").Select
    Worksheets("Database1").Range("A1").End(xlDown).Row 1
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Worksheets("Enrolment Form").Select
    Range("M25").Select
    End Sub
    [HTML]

    Where am I going wrong in what should be an easy coding?

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Copy Paste range to first empty row

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    PS Use code tags instead of HTML tags to post code.
    Last edited by bakerman2; 09-01-2016 at 12:53 AM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Copy Paste range to first empty row

    Double posted somehow... see next post
    Last edited by WasWodge; 09-01-2016 at 01:10 AM.
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  4. #4
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Copy Paste range to first empty row

    If you do actually only want the values copied then try one of the options below...

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    I also echo the statement below
    PS Use code tags instead of HTML tags to post code.
    Edit: apologies I missed the last edit by bakerman2 when writing and posting
    Last edited by WasWodge; 09-01-2016 at 01:13 AM. Reason: o for a

  5. #5
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Re: Copy Paste range to first empty row

    That was so depressingly simple, I despair.

    Thanks for your assistance.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Copy Paste range to first empty row

    You're welcome and thanks for adding rep points.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] copy range and paste values only to another sheet in next empty row
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2015, 05:08 AM
  2. [SOLVED] Copy range and paste to next empty row in a defined row or area
    By JimmyG. in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-13-2013, 03:11 PM
  3. [SOLVED] Copy and Paste Cells to Next empty cell in range
    By oddinho2 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-20-2013, 12:51 PM
  4. [SOLVED] Macro to Copy Range and Paste in the Empty Row Same Sheet
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-22-2013, 11:01 AM
  5. Copy Range and paste in an empty row below. Enter data via userform
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2013, 08:25 AM
  6. Cannot copy/paste save data if range value is empty
    By Christeen in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-12-2011, 04:04 AM
  7. Copy then paste special to next empty row in range
    By slearner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2010, 02:54 AM

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