title: If var isnumber, for script
body: <p>I need to run a script which contains the logic: If isNumber, Then DoSomething.</p>
  
  <p>I've run other such <em>if then</em> tests such as if blank, and if cell contains "x". It should be simple but I can't find a solution. I've tried getNumberFormat, innum, isnumber, etc.</p>
  
  <pre class="lang-js prettyprint-override"><code>function ifIsNumber() {
  
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var s = ss.getActiveSheet();
  
  var substring1 = s.getRange("A1").getNumberFormat();
  
  s.getRange("B1").setValue(substring1);
  
  }
  </code></pre>
  
  <p>This code checks cell A1 and returns in cell B1 the string "0.###############", for both cells containing numbers AND text. How can I identify which cells are numbers?</p>