Value is returning Incorrectly
<p>I am really confused with this one. I know it's probably something simple, but I can't seem to figure it out. I am essentailly creating a price calculator, and this is the most vital part of the macro.</p>

<pre><code>Dim z As Double
For z = 7 To 8 Step 1
  If ActiveSheet.Cells(z, 10).Value = "" Then

    '''Dim Ref1 As Double
    '''Set Ref1 = Sheets("Ref").Cells(o, 4).Value
    Dim o As Double
    For o = 5 To 150 Step 1
        If ActiveSheet.Cells(z, 20).Value = Sheets("Ref").Cells(o, 3).Value Then
            MsgBox "Found: " &amp; Sheets("Ref").Cells(o, 4).Value
            ActiveSheet.Cells(z, 10).Value = Sheets("Ref").Cells(o, 4).Value
            Exit Sub
        Else
        End If
    Next o

  Else
  End If
Next z
</code></pre>

<p>So the MsgBox returns the value I am looking for, but it is rounded to only 4 decimal places. I need more, but that isn't as big of a problem as the fact that the cell is then populated by zero, not the value that was in the MsgBox. I can't figure out why, considering they are both:</p>

<pre><code> Sheets("Ref").Cells(o, 4).Value
</code></pre>

<p>You can see I began to create a Double variable for the value (Ref1). I thought that maybe the '.Value' was rounding to a whole number when it populates the cell,  but I got a 400 error when trying to use this. </p>

<p>Any help would be much appreciated! </p>