title: Truncate strings in Excel - is there a function to remove last part of string after separator
body: <p>Is there a smart macro in Excel (2000 upwards) to remove the last part of a string, if it has a certain separator?</p>
  
  <p>If the separator is not there, the string should be preserved</p>
  
  <p>For instance, for "."</p>
  
  <pre><code> abcd.1          =&gt;  abcd
   abcd            =&gt;  abcd
  </code></pre>
  
  <p>I guess I could write something using a combination of Instr and Mid and such, but I am curious to know whether there is a smarter shorthand for it, like "Strip('abcd.1';'.')" or so.</p>