Copy to last row without overwritting previous rows

Bakemono

New Member
Joined
May 4, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi. Is there any way to do the same without overwritting previous rows? like, copy G2:M2 to the last columns without data only

Code:
Sub Copy()
Dim Last_Row As Long
Last_Row = Range("A" & Rows.Count).End(xlUp).Row
Range("G2:M2").Copy Range("G3:M" & Last_Row)
End Sub
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Do you mean the below?
VBA Code:
Sub Copy()
Dim Last_Row As Long
Last_Row = Range("A" & Rows.Count).End(xlUp).Row
Range("G2:M2").Copy Range("G" & Last_Row + 1)
End Sub
 
Upvote 0
Do you mean the below?
VBA Code:
Sub Copy()
Dim Last_Row As Long
Last_Row = Range("A" & Rows.Count).End(xlUp).Row
Range("G2:M2").Copy Range("G" & Last_Row + 1)
End Sub
Partially but thanks. It is pasting G2:M2 on last row only but I have more blanks before last row. I need a way to paste that range to all blank rows not only the last row
 
Upvote 0
Partially but thanks. It is pasting G2:M2 on last row only but I have more blanks before last row. I need a way to paste that range to all blank rows not only the last row
without overwritting rows with data
 
Upvote 0
It pastes to the first blank row after the last cell with data in column A, if G is shorter than column A then the last row needs to refer to column G.
If you have formulas returning "" then you'll need another method as the cells aren't empty if there is a formula in them.

If the above doesn't help then you need to show/explain your layout and what is in the cells in a lot more detail
 
Upvote 0
It pastes to the first blank row after the last cell with data in column A, if G is shorter than column A then the last row needs to refer to column G.
If you have formulas returning "" then you'll need another method as the cells aren't empty if there is a formula in them.

If the above doesn't help then you need to show/explain your layout and what is in the cells in a lot more detail
Sorry, let me explain it with another example. I have a drop list in A2, how can I copy that cell to the last rows from A8 to A10 without overwritting the other different options that I already have? Also, it should be a dynamic range, I dont need to copy that cell on the same range. I dont know if a loop can help but I am not really good at it :(
A1Region
A2EMEA - droplist
A3EMEA
A4AMER
A5EMEA
A6APAC
A7EMEA
A8
A9
A10
 
Upvote 0
What column/cells are the various regions in? column A?
without overwritting the other different options that I already have?
I haven't a clue what this means, do you mean the regions you are showing? if yes what is defining the last row to have data pasted in?

Where does the range Range("G2:M2") in your original code come into this?

It would help if you used the boards XL2BB addin to post ranges so we can actually see what you are dealing with.
 
Upvote 0
What column/cells are the various regions in? column A?

I haven't a clue what this means, do you mean the regions you are showing? if yes what is defining the last row to have data pasted in?

Where does the range Range("G2:M2") in your original code come into this?

It would help if you used the boards XL2BB addin to post ranges so we can actually see what you are dealing with.
Omit the previous range, that is why I told you that this is new another example. Are you willing to help? if so, I'm telling you that I have a drop list in cell A2, that droplist contains the different regions. I need that droplist to be pasted in the last rows but I dont want to overwrite the other rows with regions already.
 
Upvote 0
Are you willing to help?
Have I said that I'm not? but there isn't much I can do if you don't provide the information needed

You haven't answered how we get the range it starts from. You state you have a drop list in A2 but don't state what is in the other cells for the paste to start from A8
how can I copy that cell to the last rows from A8

You don't state how we are defining the last row to paste to (A10?) as it obviously isn't the data in column A.

As I stated it would make life a lot easier if you posted your data using the boards XL2BB addin

Omit the previous range, that is why I told you that this is new another example.
When posting it helps if you give the correct data to start with
 
Upvote 0

Forum statistics

Threads
1,215,227
Messages
6,123,738
Members
449,116
Latest member
alexlomt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top