+ Reply to Thread
Results 1 to 7 of 7

I need a macro that pastes a selected range in the next empty cell until row 2000

  1. #1
    Forum Contributor
    Join Date
    09-09-2013
    Location
    California, USA
    MS-Off Ver
    MS 365 Subscription
    Posts
    130

    I need a macro that pastes a selected range in the next empty cell until row 2000

    I am looking to create a macro that will take a range I have manually selected and paste is in the next empty cell in column A until row 2000.

    Can someone help?

    Thanks

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: I need a macro that pastes a selected range in the next empty cell until row 2000

    I was with you until you mentioned 'until row 2000'

    Please explain what you mean by this. I can interpret it in different ways. For instance if the next empty cell is say A1990 and you select 20 rows, do you only want the first 10 values you've selected to be copied, or the last 10. Or maybe neither of these is what you want.

    Give some specific examples and no doubt we can help further.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    09-09-2013
    Location
    California, USA
    MS-Off Ver
    MS 365 Subscription
    Posts
    130

    Re: I need a macro that pastes a selected range in the next empty cell until row 2000

    Quote Originally Posted by Richard Buttrey View Post
    I was with you until you mentioned 'until row 2000'

    Please explain what you mean by this. I can interpret it in different ways. For instance if the next empty cell is say A1990 and you select 20 rows, do you only want the first 10 values you've selected to be copied, or the last 10. Or maybe neither of these is what you want.

    Give some specific examples and no doubt we can help further.

    Okay, sorry for the confusion. What I mean is that I want to select a range and paste is in the next empty cell in column A.
    In this case, the next empty cell in column A will be A41. So I would like a macro to keep pasting my selected range in the next empty cell
    until the pasting has reached A2000. Then I want it to stop so it doesn't keep pasting endlessly.

    Does this make more sense?

    Thank you

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: I need a macro that pastes a selected range in the next empty cell until row 2000

    What's the size of your selected range. Is it a single column of values or a range of rows and columns.

    If the range you're selecting is in a single column, how many values are you selecting? 1, 40 or a variable number.

    What should happen if below the next empty cell (working down) there are cells with values? Or by empty cell do you mean the cell below the one you would find with an End Up cursor movement starting on the last row.

    As ever an actual workbook with some specific examples in it is worth a thousand words

  5. #5
    Forum Contributor
    Join Date
    09-09-2013
    Location
    California, USA
    MS-Off Ver
    MS 365 Subscription
    Posts
    130

    Re: I need a macro that pastes a selected range in the next empty cell until row 2000

    Quote Originally Posted by Richard Buttrey View Post
    What's the size of your selected range. Is it a single column of values or a range of rows and columns.

    If the range you're selecting is in a single column, how many values are you selecting? 1, 40 or a variable number.

    What should happen if below the next empty cell (working down) there are cells with values? Or by empty cell do you mean the cell below the one you would find with an End Up cursor movement starting on the last row.

    As ever an actual workbook with some specific examples in it is worth a thousand words

    My range is A21:BF40. And when I run this macro, there will never be any values in any cells below row 40. So I guess when I say empty cell, then next empty cell would be A41. So it would paste every 20 cells starting in A41, then A61, A81, A101.... and so on until A2000.

    If this still is a bit confusing, I will create an example sheet for you.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: I need a macro that pastes a selected range in the next empty cell until row 2000

    Yes a workbook would be useful. It's not clear whether the stuff you're copying and pasting contains formulae that reference other cells and if so are you wanting to copy and paste values or formulas.

    Just as a matter of interest what use do you make of this duplicated data? I ask since there may be more elegant and efficient ways of achieveing your goal if we can understand your final requirement rather than just your perceived solution.

  7. #7
    Forum Contributor amartinez988's Avatar
    Join Date
    05-04-2015
    Location
    Miami
    MS-Off Ver
    Office 2010
    Posts
    183

    Re: I need a macro that pastes a selected range in the next empty cell until row 2000

    This is how I would do it!
    Of course there are a lot of different methods.

    Please Login or Register  to view this content.

+ 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] Macro that pastes from the clipboard into the next empty cell in a column
    By Msimm14 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2013, 02:14 AM
  2. MACRO to empty a range of cells based on whether specified cell is empty
    By TBJV in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2013, 10:35 PM
  3. [SOLVED] Automating a macro that copies and pastes data and pastes 2 rows under the previous one.
    By thebank in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2012, 05:02 PM
  4. [SOLVED] Macro to find empty cell and select range to print selected.
    By vincentwongau@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-15-2006, 04:10 AM
  5. In Excel 2000, how can a macro look for the next empty cell?
    By Martin Hextall in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-16-2005, 07:49 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