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

Report
-
Posts
2647
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
September 3, 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
2647
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
September 3, 2020
434
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 2836 users have said thank you to us this month