Thread
:
Does Excel have a counting glitch? or is it more likely me?
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Does Excel have a counting glitch? or is it more likely me?
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?
--
Don Guillett
SalesAid Software
"Ron" wrote in message
...
(Win xp - Excel 2003)
Hi all,
This code (on my machine) runs correctly until the variable myFigure
reaches 1.13 then just loops as if there is no cell value with 1.13.
It also does it at 1.38 if you start with the variable myFigure at more
than 1.13. Also at 1.63 if you start at 1.39.
This is confusing the hell out of me.
Can anyone shed light on this for me.
tia
Ron
Sub FirstRun()
Dim x As Integer
Dim myFigure As Double 'also tried just Dim myFigure
' Application.ScreenUpdating = False
myFigure = 1.05
Range("i3").Select
For x = 0 To 36
ActiveCell.Value = myFigure
Range("i2").Select
Do Until ActiveCell.Value = myFigure
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0, 1).Value = "Line " & x
ActiveCell.Offset(1, 0).Select
myFigure = myFigure + 0.01
Next
End Sub
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]