View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Glenn Ray[_3_] Glenn Ray[_3_] is offline
external usenet poster
 
Posts: 34
Default Does Excel have a counting glitch? or is it more likely me?

That's an interesting problem. I noted that the error did not occur when
myFigure was defined as either Single or Currency.

I also noted that the error also occurs if different increments are used.
For example, if the increment line is changed to
myFigure = myFigure + 0.005,
the error occurs when trying to find a match @ 1.06.

If myFigure = myFigure + 0.001,
the error occurs when trying to find a match @ 1.0525

I'm seeing a pattern here, but don't recognize it.

If myFigure = myFigure + 0.0001,
the error occurs when trying to find a match @ 1.055




"Ron" wrote:

Hi Don,

It was/is part of a much more complex bit of code. I simplified it to
demonstrate the "error"

It doesn't matter what my aim is, I wanted to know if this is some sort of
glitch. Why does it just loop when it gets to 1.13? Why does it also
loop at 1.38, 1.63, 1.88, 2.02 and so on.

The code is simple enough, and works for so many times then just decides to
"down tools" at these same points every time.

I've looked at it time and again and can't see why it would run ok multiple
times and then just loop

Ron











"Don Guillett" wrote in
:

It appears that you are putting your incremental increase outside the
loop and you are selecting when you shouldn't.

If you are just trying to find 1.13 why use FIND instead. What are you
trying to do?