Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Adding hours & minutes

Posted on 2010-11-08
6
Medium Priority
?
3,777 Views
Last Modified: 2012-06-21
I want to add hours and minutes in excel.
However when going over 24, the spreadsheet doesn't know what to do.

Example:
13:30 + 2:45 +  11:15

I tried changing the formatting to Time > 37:30:55 and it gave me 339:30:00
The cells that contain the time are calculated cells, which calculate the difference between two times of the day
The formatting for those cells is Time > 13:30
0
Comment
Question by:itkamisama
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 50
ID: 34088935
Hello,

you need to format the result with

[hh]:mm

note the brackets! Otherwise, Excel will interpret everything above 24 hrs as a day.

cheers, teylyn
0
 
LVL 50
ID: 34088951
See attached. Cell A1 has custom format [hh]:mm

cheers, teylyn
Book2.xls
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34089229
If you add those 3 times and get 339:30 then [at least one of] the individual times must be higher than 13:30, 2:45 and 11:15.
Try formatting everything with the 37:30:55 format (which is essentially the same format as teylyn's suggested [h]:mm)
Are the values what you expect? If not then there is possibly something wrong with the formulas you are using to calculate the time difference. Can you post a sample formula?
regards, barry
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:itkamisama
ID: 34094702
I still can't get it to work
I am enclosing the spreadsheet. Maybe it makes more sense that way.
contractTimes.xlsx
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 total points
ID: 34096360
Hello,

to troubleshoot, change the format of all your time values to [hh]:mm and you'll see what's happening.

You are using a formula to calculate times in columns D and I

=IF(time out >time in, time out +1, time out)- time in

This results in 25:30 hrs for a time in = 11:40am and time out = 4:55 pm on the same day. I'm sure that's not what you want.

Change the formula for the calculated time to

=IF(time out < time in, time out +1, time out)- time in

and your sheet will calculate fine.

cheers, teylyn
0
 
LVL 1

Author Closing Comment

by:itkamisama
ID: 34116595
You were absolutely correct. Once I change > to < everything worked perfectly fine. Thank you for your help.
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
New style of hardware planning for Microsoft Exchange server.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question