Trying to understan what is wrong in function? but cant find what is wrong
Sub test()
Dim a as double, b as double
a = "10,31"
b = "10,31"
Msgbox check(a,b)
End Sub
Function check(a as double, b as double)
ff = TypeName(a) ' double
gg = TypeName(b) ' double
If a= b Then GoodExVat = True Else GoodExVat = False: diffExVAt = b - a ' here a = 10,31 b=10,31 diffExVAt = -3.5527136788005-15
check = diffExVAt
End Function
if a and b seted as 10,31 everything is ok, but when 10,31 comes from other function or expression then i got -3.5527136788005-15
What is that? It is not first time i got same thing. What is wrong with Excel?