Excel- Data Merging
Excel- Data Merging
(OP)
Hey People,
I've been using that wonderful little program by Microsoft (don't we all love them!!) called excel and naturally am having a few problems.
I have a data spreadsheet with several time related columns (ie hours, minutes, seconds). I would like to merge those 3 columns into one time column so it displays something like hh:mm:ss.
If anyone has any ideas on how to do this I would be most grateful.
Thanks
"Yesterday I couldn't spell engineer, now I is one"
I've been using that wonderful little program by Microsoft (don't we all love them!!) called excel and naturally am having a few problems.
I have a data spreadsheet with several time related columns (ie hours, minutes, seconds). I would like to merge those 3 columns into one time column so it displays something like hh:mm:ss.
If anyone has any ideas on how to do this I would be most grateful.
Thanks
"Yesterday I couldn't spell engineer, now I is one"





RE: Excel- Data Merging
It isn't quite as simple as that in practice!
Cheers
Greg Locock
RE: Excel- Data Merging
=(A2*3600+B2*60+C2)/(24*3600)
What I am doing is combining the hours, minutes and seconds into total seconds, then dividing by the number of seconds in a day, to get fractions of a day. (Excel uses the integer part of a time / date code as representing the day number, and the fractional part as being the fraction of that date. (e.g. 0.25 is 6:00 am, 0.75 is 6:00 pm, and so on.)
Hope this helps.
RE: Excel- Data Merging
With hours as an integer in A1, minutes as an integer in B1 and seconds in C1 use :
=TIME(A1,B1,C1)
wherever you want it.
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
RE: Excel- Data Merging
Boy, do i feel stupid! I never knew that Excel had that "Time" function built right in - a bit simpler than writing your own code to do the same job!
Thanks, johnwm