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: 10
Default Problem with Do While loop

I am using a Do While loop to find when a time has been reached in a list of
measurements e.g.

Dim Time_Now As Double
Dim Calc_End_Time As Double

Calc_End_Time = Time_Now + Slew_Settle_Time

Do While Time_Now < Calc_End_Time
Time_Now = Sheets("Synchro.LFSS_Training_Tellback").Cells(p, 2)
p = p + 1
Loop
p = p - 1

This seems to work rather unreliably in that the condition should be met
when the two times are equal or Time_Now is later than Calc_End_Time.

Sometimes Time_Now < Calc_End_Time is shown as False when the times are the
same, (Calc_End_Time = 36552.0671068634 and Time_Now = 36552.0671068634).

This same code works correctly for other data and is consistently wrong in
other areas.

Any help would be gratefully received.

Alec
 
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
do while loop problem April Excel Discussion (Misc queries) 4 October 18th 09 07:51 PM
loop problem teepee[_3_] Excel Discussion (Misc queries) 3 December 31st 08 11:09 AM
Loop Problem smandula Excel Programming 0 March 23rd 06 01:51 PM
Problem adding charts using Do-Loop Until loop Chris Bromley[_2_] Excel Programming 2 May 23rd 05 01:31 PM
For..Next loop problem Dwaine Horton Excel Programming 1 February 18th 04 12:12 AM


All times are GMT +1. The time now is 10:12 PM.

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"