title: Counting number of spaces before a string in Excel
body: <p>A program that exports to Excel creates a file with an indented list in a single column like this: </p>
  
  <pre><code>Column A
   First Text
    Second Text
     Third Text
    Fourth Text
   Fifth Text
  </code></pre>
  
  <p>How can I create a function in excel that counts the number of white spaces before the string of text? </p>
  
  <p>So as to return: 1 for the first text row and 3 for the for the thirst row, etc in this example. </p>
  
  <p>Preferably seeking a non-VBA solution. </p>