title: Google Sheets function to rename sheet to equal cell value
body: <p>I'm trying to get my sheet names to equal cell values, whether it be text or numbers, but I've come up short.
  After numerous google searches, and testing, this is as close as I've gotten to an answer.</p>
  
  <pre><code>function myFunction() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getSheets()[1]
    var cell = sheet.getRange("A2")
    sheets[3].setName(cell);
  }
  </code></pre>