title: How to Count the Number of a Specific Character in a Cell with Excel VBA
body: <p>I have a number of items in cells that are separated by dashes. I'm trying to normalize the database by splitting rows so that each row contains only one entry. How do you find/count strings in Excel VBA. I know you can do values for whole cells with</p>
  
  <pre><code>myVar = Application.WorksheetFunction.COUNTIF(Range("A1:Z100"),"Value")
  </code></pre>
  
  <p>I need to search a single cell and find out how many hyphens there are. Example</p>
  
  <pre><code>123-456-789 = 2
  9876-12 = 1
  </code></pre>