×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# 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"

### RE: Excel- Data Merging

roughly speaking, turn it into seconds since midnight, then format that cell as 'time'

It isn't quite as simple as that in practice!

Cheers

Greg Locock

### RE: Excel- Data Merging

In the following, I assume Column A has hours (as an integer), Column B has minutes (also as an integer), and Column C has seconds. Enter the following formula in Column D, and use one of Excel's standard built-in time formats:

=(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

Or you could just use the TIME(Hour,Minute,Second) function.

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
________________________________________________________

### RE: Excel- Data Merging

Doh!

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

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!