P
Pete
I have a database with time of day formatted such that 8:37 AM appears
as "837" or 10:06 PM appears as "2206" (without the ""). I wish to
calculate the elapsed time between successive entries in seconds (for
example, A1 -> 837, A2 -> 856, B2 -> 1140).
I can do this by using the following formula to convert my time of day
data as follows:
=IF(LEN(A1)=4,CONCATENATE(LEFT(A1,2),":",RIGHT(A1,2)),CONCATENATE(LEFT(A1,1),":",RIGHT(A1,2)))
This converts, for example, "837" to "8:37". Excel correctly finds a
difference between these times if I use the custom cell format ""
for the A1-A2 formula cell.
But then I run into trouble! Simply dividing the distance (in meters)
by the seconds yields wrong results. For example, 2487 m / 1140 s gets
me 188488.4211, whether that cell is formatted as General, Text or
Number! (The answer should be 2.18 m/s.) Clearly (?!) the simple math
formula is not treating my 'number of seconds' data as the number of
seconds!
Is there some kind of WYSIWYG formula to "convert" my seconds data?
Thanks in advance, Pete
as "837" or 10:06 PM appears as "2206" (without the ""). I wish to
calculate the elapsed time between successive entries in seconds (for
example, A1 -> 837, A2 -> 856, B2 -> 1140).
I can do this by using the following formula to convert my time of day
data as follows:
=IF(LEN(A1)=4,CONCATENATE(LEFT(A1,2),":",RIGHT(A1,2)),CONCATENATE(LEFT(A1,1),":",RIGHT(A1,2)))
This converts, for example, "837" to "8:37". Excel correctly finds a
difference between these times if I use the custom cell format "
for the A1-A2 formula cell.
But then I run into trouble! Simply dividing the distance (in meters)
by the seconds yields wrong results. For example, 2487 m / 1140 s gets
me 188488.4211, whether that cell is formatted as General, Text or
Number! (The answer should be 2.18 m/s.) Clearly (?!) the simple math
formula is not treating my 'number of seconds' data as the number of
seconds!
Is there some kind of WYSIWYG formula to "convert" my seconds data?
Thanks in advance, Pete