LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Strange problem

I have used the following block of code to try and detect any number that is
more than two decimal places in length, unfortunately I am getting strange
results, occasionally it is throwing out numbers that are correct. the
differance being a very small amount such as 1.42145*10^-14

Why is it doing this?....and is there a more reliable way of detecting
numbers over two decimal places in length?


For Each num In Selection
If Int(num * 100) - (num * 100) < 0 Then
MsgBox "More then two decimal places....."
MsgBox Int(num * 100) - (num * 100)
End If
Next num



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Macro name problem Joe M. Excel Discussion (Misc queries) 2 January 26th 10 12:41 AM
strange problem -Bryan[_2_] Excel Discussion (Misc queries) 3 May 1st 08 06:56 PM
Subtotal problem. Very strange! Carl Excel Worksheet Functions 0 October 6th 06 04:07 PM
Strange Problem Perry Excel Discussion (Misc queries) 7 April 12th 06 09:52 PM
Strange Problem... Sujesh Excel Discussion (Misc queries) 6 December 30th 05 02:56 PM


All times are GMT +1. The time now is 05:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"