title: Passing arguments / parameters from a Google sheets custom function to the script function
body: <p>I'm stuck on a something basic.  How do I pass arguments to a Google Sheets custom function.</p>
  
  <p>I have a function in the Apps Script code editor defined as:</p>
  
  <pre><code>function usageByMonth(range,theDate) {
      // do something with the arguments passed
  }
  </code></pre>
  
  <p>In my Google sheet the function is used as</p>
  
  <pre><code>=usageByMonth('Source Meter Readings'!A5:A,B1)
  </code></pre>
  
  <p>When trying debug the function, I find that the two arguments are "undefined".  I've looked at many posts and even copied functions directly from the examples with the same result.</p>