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
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
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 iconbelow the post.
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
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.
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.
This is how I would do it!
Of course there are a lot of different methods.
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks