Thread: compare values
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
broro183[_38_] broro183[_38_] is offline
external usenet poster
 
Posts: 1
Default compare values


Hi Robert

This is not a VBA solution but may satisfy your needs...

Insert a new column (if needed) & type in:
=IF(ROUND(A1,0)=ROUND(B1,0),"approx match", "rounded values don't
match")

Change the cell references as required & the True/False statements.

This will compare the two values after rounding them to the nearest
whole number. Depending on your exact requirements, either of the
functions "roundup(reference,# of decimals)" or "rounddown(reference,#
of decimals)" / "int(reference)" may be more appropriate to use in your
If statement (type "round" into Excel help for more details).

Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=513601