Thread: Not equal to?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Not equal to?

Try

?Round(salecomm,2) = 1228.95

it is probably because the actual value is 1228.95243357 or something, but
only showing 2 dec places.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Evan" wrote in message
...
I have a form that compares the total values of several fields to a

variable
value when the user clicks the Submit button. The fields need to equal the
variable value or the form will not be submitted. I ran into a problem

where
the fields DO appear to equal the variable value, but excel says no....In
the immediate window, I type ?salecomm and get 1228.95. I then type
?salecomm = 1228.95 and get back FALSE. I cannot seem to duplicate this
problem with other random numbers. I get back TRUE when using other

values.
I obviously have not tried every value, but I am lost for now. Any ideas
where I might start?

Thanks