title: Loop through range of cells to check if it is a number (any number)
body: <p>I'm looking for a way to loop through a range of cells and check if the cell is a number or not. I'm aware that dates are actually numbers and I will be searching for number of dates. So let's say I want to check the range ("A2:A10") and if the cell is a number, add 1 to my datecount variable. The ISNUMBER() function seems to only be useful if you are looking for a specific number. But I'm looking for any number.</p>
  
  <pre><code>Sub Main()
  
  Dim Datecount As Integer
  Datecount = 0
  
  Range("A2").Select
  For Each c In Range("2:2")
      If c.Value.IsNumber() Then
          Datecount = Datecount + 1
  
  Next
  
  End Sub
  </code></pre>
  
  <p>The above is the most important thing I need help with. If you can help with that, great! If you can help with this next part, that would be wonderful as well. Basically, I'd like to check if the cell is a number just like above. But this time, if it isn't a number I want it to exit the loop.</p>
  
  <pre><code>Dim Datecount As Integer
  Datecount = 0
  
  Range("A2").Select
  For Each c In Range("2:2")
      If c.Value.IsNumber() Then
          Datecount = Datecount + 1
      ElseIf
          Exit For
      End If
  Next
  
  End Sub
  </code></pre>