+ Reply to Thread
Results 1 to 3 of 3

Copy & Paste to next empty row

  1. #1
    Registered User
    Join Date
    08-04-2009
    Location
    Oxford, England
    MS-Off Ver
    Excel 2010
    Posts
    47

    Copy & Paste to next empty row

    Hi All

    I've written this macro but I'm still having problems with it in that it's only copying the data into one row then overriding it when the macro is run again

    What have I missed on this to force it to go down to the next available row and paste the data

    Also, for some reason it won't start at B3 but rather B1....

    Thanks again

    Dan

    //Code Sub CopyPaste()

    Sheets("Sheet1").Select
    Range("D10, D12, D14, D16,D18, D20").Select
    Selection.Copy
    Sheets("Sheet2").Select
    Range("B3").End(xlUp).Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True


    End Sub //Code

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Copy & Paste to next empty row

    end(xlup) will return the last row with data in so you need the one after that for the next empty row. Also, if you move up from B3 it will either return B1 or B2...

    You probably want:
    Please Login or Register  to view this content.
    Although I'm not sure if you can copy and paste a range like that which isn't continuous.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy & Paste to next empty row

    Duplicate post

    http://www.excelforum.com/excel-prog...empty-row.html

+ 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. Copy/Paste to Next Empty Row Overwriting Previous Row When Column A Is Empty
    By grantfitz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2013, 04:34 PM
  2. VBA to copy and paste data into another tab in first available empty row
    By Drivium in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-22-2013, 03:44 PM
  3. Vba - find next empty column, insert column, copy paste values & copy paste formulas
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2012, 12:43 PM
  4. copy paste in 1st empty row
    By neorez in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-17-2010, 04:21 AM
  5. Copy and paste into next empty row
    By kolovel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2010, 07:52 PM

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