title: Use VBA in Google Sheets to auto
body: <p>I am trying to get a google doc to include an auto-fill of that day's date whenever a value in a row is changed.</p>
  
  <p>I found an excel VBA code that does the trick (below). However, it won't work in google sheets.</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
  If Target.Row &gt; 1 Then Cells(Target.Row, "B") = Date
  End Sub
  </code></pre>
  
  <p>Do you know how to make this work in sheets, either as  function or as code?</p>