Yigit Tanverdi
Yigit Tanverdi

Reputation: 161

copy and pasting to the next empty row

I have this following code which copies BX2 to BX400 from "copySheet" and pastes it to first empty row in Column A of "pasteSheet".

 copySheet.Range("BX2:BX400").Copy
 pasteSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial  xlPasteValues

Which code pastes it to first empty row in Column B then ?

Upvotes: 1

Views: 1883

Answers (1)

user4039065
user4039065

Reputation:

If you are only concerned with pasting the values then direct value transfer is preferred as it does not involve the clipboard.

with copySheet.Range("BX2:BX400")
    pasteSheet.Cells(Rows.Count, "B").End(xlUp).Offset(1, 0).resize(.rows.count, .columns.count) = .value
end with

Upvotes: 1

Related Questions