title: google sparesheets Parameter passing question
body: <p>when input string is work, 
  but input ref value doesn't work, why?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function IsInArray(CompareValue,CompareArr,TPart,FPart) 
  {
    var output = FPart
    var ar = SpreadsheetApp.getActiveSpreadsheet().getRange("RefData!A:A").getValues()
    
    for (var i in ar)
    {
     if (ar[i] == CompareValue){output = TPart}
    }
    return output
    
  }
  
  // =IsInArray(E2,RefData!A:A,"T","F")
  
  SpreadsheetApp.getActiveSpreadsheet().getRange("RefData!A:A").getValues()
  // output = T
  
  // ↑ can retruns Tpart, ↓ truns to CompareArr doesn't work
  
  SpreadsheetApp.getActiveSpreadsheet().getRange(CompareArr).getValues()
  // output = #ERROR</code></pre>
  </div>
  </div>
  </p>