title: Truncate a string inside an Excel cell if the char count is greater than than a value
body: <p>In Excel, for each row of the sheet I have various length strings (a1,a2,a3...). In cell B2 I have <code>=Length(A1)</code> to count the chars inside the string.</p>
  
  <p>I need a formula/function that can truncate all strings in column A which have a character count > 20 
  Something like:</p>
  
  <pre><code>$string = THIS IS A LONG STRING I WANT TO TRUNCATE IF EXCEEDS 20 CHARS;
  if ($string &gt; 20)
  {
     COUNT 20 CHARS FROM THE BEGINNING OF STRING AND CUT THE REST
  } 
  else 
  {
   skip 
  }
  </code></pre>