ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Time formats (https://www.excelbanter.com/excel-programming/379789-time-formats.html)

keri

Time formats
 
I have a problem with a spreadsheet when I am using a custom format
h:mm:ss.000 (to show milliseconds).

Column I is a time
Column J adds I to the start time

eg.

Start time; 9:32.23
If I2 = 1.32.146 then J2 = 9:33.55
Then if I3 = 1:27.316 then J3 = 9:35.22

The problem I have is if the value in I is less than 1 minute then when
column J adds this value to the time it presumes the I value is in
minutes instead of seconds

eg

Start time; 9:59.47
I2 = 24.189 then J2 = 590:31.57

(J2 should be 10:00.12)

I think the only way to fix this may be to run a macro first that finds
all the values that are less than 1 minute and add 00: before them.
Obviously the problem is that excel thinks this is greater than 1
minute so how i would find these cells to alter them is beyond me.

Or there may be another way. Any suggestions?


PaulD

Time formats
 
The answer to this is similar to the answer to your other post
assuming 9:59:47 is in cell A1 and 24.189 is in cell A2 then
=A1+A2/(24*60*60)
will give you 10:00:11

"keri" wrote in message
ps.com...
:I have a problem with a spreadsheet when I am using a custom format
: h:mm:ss.000 (to show milliseconds).
:
: Column I is a time
: Column J adds I to the start time
:
: eg.
:
: Start time; 9:32.23
: If I2 = 1.32.146 then J2 = 9:33.55
: Then if I3 = 1:27.316 then J3 = 9:35.22
:
: The problem I have is if the value in I is less than 1 minute then when
: column J adds this value to the time it presumes the I value is in
: minutes instead of seconds
:
: eg
:
: Start time; 9:59.47
: I2 = 24.189 then J2 = 590:31.57
:
: (J2 should be 10:00.12)
:
: I think the only way to fix this may be to run a macro first that finds
: all the values that are less than 1 minute and add 00: before them.
: Obviously the problem is that excel thinks this is greater than 1
: minute so how i would find these cells to alter them is beyond me.
:
: Or there may be another way. Any suggestions?
:




All times are GMT +1. The time now is 11:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com