# VBA Code to Google Sheets



## jourdan (May 3, 2017)

I need a google sheet to have the same functionality that my excel workbook has but the code doesn't work on google sheets. there are 4 columns (Date, Location, Location, Location) when a value is updated in a location column I need the date cell in that row to update with the current date 

Here's what the vba code is: 
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Row > 1 Then Cells(Target.Row, "B") = Now()
End Sub

and that seems to work fine in macros but having trouble figuring out that functionality in google sheets... help appreciated!


----------



## CalcSux78 (May 4, 2017)

I think you need to look into Google Apps Scripting.  https://developers.google.com/apps-script/quickstart/macros


----------

