Working with times as conditions in formulas

N

NDBC

I have now located the times. Thanks for your help with the last post. This
line is giving me a type mismatch error. When I check the values by holding
my mouse over them in debugger it has Time2.text in h:mm:ss format and
lastlap and Range(c14) as 0.000567 (time in non time format). Is this the
cause of the error and if so what is the asiest way to put time2.text into
number format.

If Time2.Text - lastlap > 1.4 * Range("c" & riderCell.Row) Or Time2.Text -
lastlap < 0.4 * Range("c" & riderCell.Row) Then

Thanks
 
O

OssieMac

If my interpretation of your question is correct then TimeValue(time2.text)
should return a proper time value.
 
N

NDBC

OssieMac you are a champion. You deserve gold status. Thanks heaps. Worked a
treat.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top