I have 2 excel number cells that look the same, but pivot tables are treating them as different entities. Using =B2=B3 excel formula gives True, but when I test in VBA I get False. Data type and value look the same. I'm thinking it has to be some rounding error, but I expect to see the difference when I print the value with VBA.
My question is besides value and data type, what else does VBA check for during a comparison?
VBA Code
Sub test()
a = Range("B2").Value
b = Range("B3").Value
If a = b Then
Debug.Print ("AWESOME")
Else
Debug.Print ("OH NO")
Debug.Print (a)
Debug.Print (b)
Debug.Print (VarType(a))
Debug.Print (VarType(b))
End If
End Sub
VBA Output
OH NO
0.0000000000325
0.0000000000325
5
5