I have a simple error checking problem. At the start of my sub I'm making sure that a range adds up to 100%. I do this by getting the value of a Cell "F3" using Range.value and storing it as a double. F3 contains a SUM formula that checks another range.
I can see that in the locals window the value of the double is 1 (because the values add up to 100%), however, the code still gets into the If statement below and exits the sub.
Sub dataCollection()
'Define sheets
Dim ipt As Worksheet
Set ipt = Sheets("Input form")
'Check that allocation is 100%
Dim alloc As Double
alloc = ipt.Range("F3").Value
If alloc <> 1 Then
MsgBox "Error, allocation does not equal 100%"
Exit Sub
End If
...
End Sub
Is this a problem with using a double in this way or something?