adding time excel

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Adding time in excel

Adding time in excel

resolvedResolved · Medium Priority · Version 2016

Kay has attended:
Excel Advanced course
Excel Advanced - Formulas & Functions course

Adding time in excel

Hi

Any pointers what would be the best formula to add 2 times together as finding it quite tricky when using the sum equation in the times below to get it to display the correct time in hours and minutes

e.g 1
Time 1 = 2hours 30 mins
Time 2 - 50 mins.


e.g 2
Time 1 = 2 hours 15mins
Time 2 = 90 mins

Many Thanks

Edited on Tue 18 Aug 2020, 13:37

RE: Adding time in excel

Hi Kay
Thank you for your question in STL's forum. My name is Ron and I am one of STL's trainers.

I can see your dilemma. I just wanted to give you a quick answer to your query before I try to find a solution.

Firstly if the entries you want to add up are displayed the same way as you entered them in the query then you can't add that up because the entry is seen by Excel as text and we can't add up text values in Excel.

What you therefor firstly have to do is to Extract the numeric values from those text entries using either Flash fill, Text to columns or use complex combinations of text functions like Mid(), Left() and right(). After that you need to make the entries the same, so turn the hour values into minutes as well. So 2 hours 30 minutes becomes 150 minutes and all the other entries containing a hour value should be converted to minute values too so you get a column showing all the durations in minutes. Once you have done that you can simply add up the minute values to get a total.

There is no simple solution to your dilemma. But I hope this steers you in the right direction.

I added an Excel file to show you how you could approach the process. It contains comments to explain the parts of the process

Kind regards

Ron Oldeboom
Learning and Development Consultant
STL-training

Attached files...

Example.xlsx

RE: Adding time in excel

Hi Ron,

Thanks for your prompt reply.

Could you possibly give ma an example of what you are trying to describe as would ease understanding please.

I would ideally like my time to be displayed in hours: minutes rather than just minutes hence is there a solution to covert this at the end step?

Appreciate your help.

thanks

RE: Adding time in excel

Hi Kay.

I hope the Excel workbook I attached shows you part of the process, and of course you are able to convert it back to hours and minutes but it is not as easy as one might think.

You can divide the total minutes by 60 to get the hours and that is fine if it is full hours. If there is a residual value it will give you that as a decimal. That decimal needs to be turned into minutes.

You can use the function CONVERT(Number,fromUnit,toUnit) to convert minutes to hours i.e. =CONVERT(D4,"mn","hr"). what this will do is convert the value from cell D4 from minutes ("mn") into hours ("hr")

I hope this helps

Ron

RE: Adding time in excel

Hi Ron,

Many thanks for helping me. Greatly appreciated.

Time convert 1.75 to 1.45 (one hour forty five minutes)

Hi Ron,

Apologies for another request.

Last part of the spreadsheet where I have time calculations that show quarters, halves and three quarters of the hour as .25, .50 and .75

How can I get them to display as 15, 30 and 45 minutes- the number of minutes they denote

Example

A1 cell 2.75 hours - I would like it to display as 2.45 hours

I also have other times such as 1.42 hours, 2.08 hours - can these also be displayed to the minutes they denote?

Any help greatly appreciated

Many thanks
K

Edited on Tue 25 Aug 2020, 10:01

RE: Time convert 1.75 to 1.45 (one hour forty five minutes)

Hi Kay,

Not a problem at all. I attached another Excel workbook with a possible solution to your query. You would have to extract the hours part of the entry and the minutes part of the entry. You then convert the hours to minutes and merge the whole thing back into one entry. I suggest you do not use FlashFill because it would not automatically update when the times change. Functions always update automatically. I hope this helps you.

I processed the data cell by cell so you know how the function is broken down. You could also analyse the function in column K by selecting the formula cell.
You then select the Formulas tab --> Auditing Tools group --> Evaluate formula.
This will break the function down for you so you can understand how it works better.

If you cannot locate the Attachment, please reply with your email address and I will send the file to you personally

Again thank you for your query

Kind regards

Ron Oldeboom

Attached files...

Minutes to hours.xlsx

Tue 1 Sep 2020: Automatically marked as resolved.

 

Training courses

 

Training information:

See also:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Saving your Excel Spreadsheet as a CSV File

In situations where you need to save your Excel spreadsheet as a CSV file, follow these simple steps.

Click the File tab and click Save As.
Enter a name in the File name field.
Click the drop-down arrow next to the Save as type field to select the file type. Scroll down the list and select CSV (comma delimited) (*.CSV)
Click Save

The data will now be saved to a separate CSV file which can be used in different applications.

View all Excel hints and tips


Server loaded in 0.05 secs.