title: Google Spreadsheet: How to name a range using Google Apps Script
body: <p>I am using the following code to name a range:</p>
  
  <pre><code>var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheets()[0];
  
  var rangeToName = sheet.getRange(column, column - 1, 1,values.length + rowOffset);
  var rangeName = 'F' + '2';
  
  ss.setNamedRange(rangeName, rangeToName); // SCRIPT CRASHES HERE
  </code></pre>
  
  <p>When executing this script, it fails with the error message: <code>The name you specified for this range is not a valid name.</code></p>
  
  <p>I get this error whenever I use a concatenated string (it does not matter if I use to delimit the string with <code>'</code> or <code>"</code>).</p>
  
  <p>How can I create the name of a range by concatenating two strings or a string and number?</p>