Format into Time.

G

GEM

In column A I have a list of about 1000 numbers going down, A1, A2, A3, etc.
The numbers represent seconds.
A1=35 (35 seconds)
A2=108 (108 seconds)
etc...

How can I modify format these numbers to the following,

108 seconds = 1:48 (1 minute, 48 seconds)
 
B

Bob Phillips

You can't directly, you will need

=A1/86400

in B1 and format that as time.
 
J

jamescox

Assuming your values in column A are numbers

=TEXT(A1/86400,"HH:MM:SS")

will give you the time as a text (drop the HH portion of the format
string if you don't want to show hours)

If you need these a datetimes for other date operations, use

=A1/86400

and use Format Cells, Custom, and enter hh:mm:ss in the Type box.

You may see some undesired results when the value in Col A gets larger
than 86400 seconds - the value will 'wrap' back to 00:00:00 at 86400 and
start again.
 
Top