I am using the following code to name a range:
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
When executing this script, it fails with the error message: The name you specified for this range is not a valid name.
I get this error whenever I use a concatenated string (it does not matter if I use to delimit the string with ' or ").
How can I create the name of a range by concatenating two strings or a string and number?