title: How to make For loop work with non integers
body: <p>The following code is easy and outputs as expected</p>
  
  <p>CODE:</p>
  
  <pre><code>Option Explicit
  
  Sub Test_loop2()
  Dim i As Long
    For i = -3 To 3 Step 1
      Debug.Print i
    Next i
  End Sub
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <p><img src="https://i.stack.imgur.com/voU6b.png" alt="enter image description here"></p>
  
  <p>The following code is exiting early due to rounding</p>
  
  <pre><code>Option Explicit
  
  Sub Test_loop2()
  Dim i As Double
    For i = -0.3 To 0.3 Step 0.1
      Debug.Print i
    Next i
  End Sub
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <p><img src="https://i.stack.imgur.com/gCKZ1.png" alt="enter image description here"></p>
  
  <p>What is the most reliable method I can use whilst retaining a <code>For Loop</code> to ensure the last value is run in the loop for non integers?</p>
  
  <p>Eg For i = X to Y step Z - Y must always be reached if it's multiple of Z</p>
  
  <p>For i = 0 to 0.3 step 0.1 then 0.3 will be in loop</p>
  
  <p>For i = 0 to 0.3 step 0.2 then 0.3 will NOT be in the loop</p>