title: How to Put Formula Count another sheet in App Script
body: <p>my First ASK and last at 2020.
  Im Newbie with google App Script, need some help
  I had 2 Spreadsheet</p>
  <ol>
  <li>Spreadsheet ssGETDATA  with SHEET1 column(<code>id,name,address,ts,visit</code>)</li>
  <li>Spreadsheet ssVERIFY with SHEET1 column (<code>id,ts</code>)</li>
  </ol>
  <p>I send data from Android use this code :</p>
  <pre><code>function doGet(e) {
   return message(&quot;Error: Please Try Again&quot;);
          }
    
  function doPost(e) {
  var id= e.parameters.id[0];
  var name= e.parameters.name[0];
  var address= e.parameters.address[0];
  var visit= e.parameters.visit[0];
          
        var ts = Utilities.formatDate(new Date(), &quot;GMT+8&quot;, &quot;dd/MM/yyyy HH:mm:ss&quot;);
        var ss = SpreadsheetApp.getActive();
        var sh = ss.getSheets()[0];
        sh.appendRow([id,name,address,ts,visit]);
        
        return message(&quot;Data Saved&quot;);
      } else {
        return message(&quot;Error: Please Try Again&quot;);
      }}}
  
  function message(msg) {
    return ContentService.createTextOutput(msg);
  }
  </code></pre>
  <p>I want to Verify data from ssGETDATA but data (<code>id</code>) appeared several times.
  so my idea every time append row executed it put formula in column (visit)  with <code>=count(id,ssVERIFYSheet1!id)</code> to check it Verified or Not</p>
  <p>how it applies in the google app script?</p>
  <p>i hope when ssVERIFY changed then ssGETDATA column (<code>visit</code>) counting too.</p>
  <p>thanks for your explanation. Happy new Year</p>