title: Returning 'Range' instead of actual string in Google Apps Script
body: <p>I am using the following function to return a concatenated string in Google Sheets. In this instance, B4 equals 'cardiology' and B1 equals '82-01'. </p>
  
  <p>The expected result is <code>dimension2=~cardiology;ga:eventCategory=~MS82-01</code>. </p>
  
  <p>However, I am getting this result, <code>dimension2=~Range;ga:eventCategory=~MSRange</code>. </p>
  
  <p>Why is the function returning 'Range' instead of the actual strings?</p>
  
  <pre><code>function highLevelData() {
    var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); // get the spreadsheet object
    SpreadsheetApp.setActiveSheet(spreadsheet.getSheets()[1]); // set the first sheet as active
    var sheet = spreadsheet.getActiveSheet(); // get the active sheet
    var reportConfig = spreadsheet.getSheets()[0]; // set report configuration sheet
    var targetSpecialty = sheet.getRange("B4"); // get target specialty
    var specialtyDimension = "dimension2=~"; // set the sytanx string for the specialty dimension
    var targetCase = sheet.getRange("B1"); // get case
    var eventCategoryDimension = ";ga:eventCategory=~MS"; // set the syntax string for the event category dimension
    var filterOutput = specialtyDimension + targetSpecialty + eventCategoryDimension + targetCase; // concatenate full filter string
    var filterCell = reportConfig.getRange("B11"); // set the filter cell
  
    filterCell.setValue(filterOutput); // output filter string to filter cell
  
  }
  </code></pre>