Excel VBA to Google App Script

49 views
Skip to first unread message

Paul Meyer

unread,
Mar 3, 2023, 10:32:57 PM3/3/23
to Google Apps Script Community
Can anyone convert this please ? 

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$2" Then
a = Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Row + 1
Sheets("Sheet2").Range("A" & a).Value = Sheets("Sheet1").Range("A2").Value
End If
If Target.Address = "$B$2" Then
b = Sheets("Sheet2").Cells(Rows.Count, "B").End(xlUp).Row + 1
Sheets("Sheet2").Range("B" & b).Value = Sheets("Sheet1").Range("B2").Value
End If
End Sub

Thanks Paul
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages