title: How to pass a cell reference to an Apps Script custom function?
body: <p>Assuming that:</p>
  
  <pre><code>A1 = 3
  B1 = customFunc(A1)  // will be 3
  </code></pre>
  
  <p>In my custom function:</p>
  
  <pre><code>function customFunc(v) {
    return v;
  }
  </code></pre>
  
  <p><code>v</code> will be 3. But I want access the cell object <code>A1</code>.</p>
  
  <hr>
  
  <p><em>The following is transcribed from the comment below.</em></p>
  
  <p>Input:</p>
  
  <pre><code>+---+---+
  |   | A |
  +---+---+
  | 1 | 1 |
  | 2 | 2 |
  | 3 | 3 |
  | 4 | 4 |
  +---+---+
  </code></pre>
  
  <p>I want to copy <code>A1:A4</code> to <code>B1:C2</code> using a custom function.</p>
  
  <p>Desired result:</p>
  
  <pre><code>+---+---+---+---+
  |   | A | B | C |
  +---+---+---+---+
  | 1 | 1 | 1 | 2 |
  | 2 | 2 | 3 | 4 |
  | 3 | 3 |   |   |
  | 4 | 4 |   |   |
  +---+---+---+---+
  </code></pre>