Cells copying and pasting in a empty cell of another sheet [Solved]

Report
-
Posts
2675
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
November 5, 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
2675
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
November 5, 2020
448
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

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!