Cells copying and pasting in a empty cell of another sheet

Report
-
TrowaD
Posts
2598
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
March 10, 2020
-
Hello,

One Excel file has 2 Sheets. First sheet called "source" and second one called "Bestand"
In sheet "source" one cell (a1 for example) must be copied and paste in sheet "bestand" in row 1.
In Row 1, I could have already datas in cells a1,b1,c1,...., cn. So pasting must be done in the next free cell of row1

How can i do this with VBA-Macro?

Thanks


System Configuration: Windows / Edge 17.17134

1 reply

Posts
2598
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
March 10, 2020
401
Hi Parker,

The following VBA code will do as requested:
Sub RunMe()
Sheets("Bestand").Cells(1, Columns.Count).End(xlToLeft).Offset(0, 1).Value = Sheets("Source").Range("A1").Value
End Sub


Best regards,
Trowa
1
Thank you

Glad we were able to help! Love us? Write us a review! Rate CCM

CCM 3580 users have said thank you to us this month