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

Report
-
Posts
2695
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 28, 2021
-
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
2695
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 28, 2021
457
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

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!