title: How to transform excel VBA code into Javascript for Google Sheets?
body: <p>everyone. I need to change a code that I created in VBA to javascript and put it into Google Sheets. Does anyone know how I can do this? The code is below</p>
  <pre class="lang-vb prettyprint-override"><code>Sub Influencers_automacao()
    Sheets(1).Activate
    Range(&quot;A1&quot;).Select
    Selection.End(xlDown).Select
    k = Selection.Row
    For t = 2 To Sheets.Count
      j = 2
      For i = 2 To k
        If Sheets(1).Cells(i, 1) = Sheets(t).Name Then
          Sheets(t).Cells(j, 1) = Sheets(1).Cells(i, 2)
          Sheets(t).Cells(j, 2) = Sheets(1).Cells(i, 3)
          j = j + 1
        End If
      Next
    Next
  End Sub
  </code></pre>