Convert minutes and seconds to hours, minutes and seconds in Excel - excel

I have the value 123:04 in an Excel cell and it currently stands for 123 minutes and 4 seconds.How can I convert this value to hours minutes and seconds?

If simply changing the format to [hh]:mm:ss does not change to the correct format, then it would need to be in [hh]:mm format or it is a string. Use this:
=A1/60
Then format the result as [hh]:mm:ss

Related

Excel time duration: from total amout of minutes to hh:mm

I'm stuck with the time functions in Excel.
I have a table filled with a number of minutes. I can easly count the number of hours by dividing the number of minutes by 60. But this gives me a real number which I can't find how to translate into a duration. I find it easier to read 37h 36min than 37.6 hours.
what I have what I want
minutes hours
monday 2160 36 36:00
tuesday 2255 37.6 37:36
wednesday 1715 28.6 28:36
Note that when I apply the [h]:mm# format to the cells it does not work. I guess because my initial data is in real value and not in time format...
Excel stores time as fractions of a day.
There are 1440 minutes in a day (60*24)
So:
=TEXT(A2/1440,"[hh]:mm")
If you just want to format the cell, so as to have a numeric value rather than a text string, then use:
=A2/1440
and format that cell as [hh]:mm
Super late to the party but the TIME() function can be used
=TIME(FLOOR(A2/60,1),MOD(A2,60),0)
or
=TIME(ROUNDDOWN(A2/60,0),MOD(A2,60),0)

Converting Times in Excel with minutes and seconds

In Excel, I need to be able to extract a time of 51:25:00 that is entered as [h]:mm:ss and convert it into minutes and seconds as 51:25 and have the output show 51:25 as in 51 minutes and 25 seconds. Once I have extracted that time I need to convert it all into minutes so into 51.467 minutes that way I can perform other calculations with those minutes.
I cannot figure out a way to use LEFT() or MID() because of the format of the orginal cells.
I can enter in values as 51:25 with the format: [mm]:ss but that is quite time consuming. But I also do not know how to extract that time into minutes.
I am looking for a formula that can convert the [h]:mm:ss into the required [mm]:ss and then another formula to look at the minutes.
Perhaps something like the following:
=MINUTE(A1/60)+SECOND(A1/60)/60
More robustly perhaps,
=HOUR(A1/60)*60+MINUTE(A1/60)+SECOND(A1/60)/60

How to convert excel time field from hours (1:00) and half hours (0:50) to get totals

I have some data containing 'total hours' in the following format:
1:00
1:50
8:75
where:
1:00 = 1hr
1:50 = 1hr 30mins
8:75 = 8hrs 45mins
I'd like to work out the total number of hours, but I am not sure what calculation to use (or what work needs to be done to get the data into a usable state)
Currently the cells containing the data are formatted as 'custom' and the type is h:mm
The data was exported from a web application
here is a link to an example of the data
Lots of comments, but I'm going to go out on a limb and assume we can treat the value in A2 as text. To get the hours portion:
Step 1: Select the column that has the times and change the format to Text.
Step 2: Select the column that will have your calculations and set the format to General
=VALUE(LEFT(A2,FIND(":",A2)-1))
The minutes portion
=VALUE(RIGHT(A2,2))/100*60
And as a decimal number of hours where the original 8:50 becomes 8.5 (8 hours 30 minutes)
=VALUE(LEFT(A2,FIND(":",A2)-1))+VALUE(RIGHT(A2,2))/100
If the original text is a format where 8:30 means 8 hours, 30 minutes:
=VALUE(LEFT(A7,FIND(":",A2)-1))+VALUE(RIGHT(A2,2))/60

Subtracting seconds in Excel

I'm trying to subtract start time from end time to get duration, ie:
1:02 - 0:10 = 0:52
But what I'm getting is:
0:92
I'm using the 0\:00 format. Other suggested formats, such as [mm]:ss, are turning my data into numbers that I don't undestand, ie 1:02 becomes 146880:00
I just want to quickly enter a bunch of times, subtract one col from the other and be done with it.
Does anyone know a way to do that?
Solutions follow an explanation of the results showing in the question.
The format 0\:00 is really the format 000 with a colon character inserted between the first and second digits.
If a cell holds the value 102 and has a format of 0:\00 it will show as 1:02 in the worksheet but behind the scenes its value is still 102. So
1:02 - 0:10 = 102 - 10 = 92 = 0:92 in 0\:00 format
To understand the result with the [mm]:ss format, you need to understand how dates (and time) values are represented in Excel. There is a reasonable explanation on this webpage from Chip Pearson
First, as a date/time value 102 is equivalent to 0:00 on 11 April, 1900 as it is 102 days from Excel's day/time zero. Second, the format [mm]:ss expresses this elapsed time in minutes and seconds. So
102 days = 102*24*60 minutes = 146880 minutes
which gets displayed as 146880:00 in [mm]:ss format
There are a couple of ways you might resolve your problem.
The first involves entering data differently. A time can be entered directly into the worksheet as hours:minutes:seconds. So 1 minute and 2 seconds can be entered as 0:1:2 (or 00:01:02 or any variant such as 0:01:2 or 00:1:02). This is probably less convenient than just entering 102. By default, numbers entered in this way will display in a hh:mm:ss format but you can suppress the display of hours by changing the format to mm:ss or [mm]:ss. The latter should be used if any of your time values are 60 minutes or more since, the former will suppress the display of hours - for example, entering 0:61:2 (61 minutes and 2 seconds) displays as 01:02 with the former but as 61:02 with the latter.
Note that if you just enter 1:2 rather than 0:1:2 Excel interprets this as 1 hour, 2 minutes and 0 seconds and will display as 02:00 using format mm:ss or as 62:00 using [mm]:ss.
The second way allows you to enter the data as before using the 0\:00 format but requires the use of formulae to convert your entered value into seconds - so, for example, an entered value of 102 is intended to represent 1 minute and 2 seconds, gets correctly displayed as 1:02 but is converted behind the scenes to 62 seconds.
If A1 and B1 contain the entered values the then formula for A1 less B1 is
=(INT(A1/100)*60+A1 - 100*INT(A1/100))-(INT(B1/100)*60+B1 - 100*INT(B1/100))
This formula calculates its result as a number of seconds.
If this result is placed in cell C1 then the formula
=100*INT(C1/60)+(C1-60*INT(C1/60))
converts C1 to a result suitable for displaying with the 0:\00 format
Alternatively, the result in seconds can be converted to days by dividing by 24*60*60 = 86400 and displayed using a time format such as [mm]:ss

Excel 2007 - Time exceeding 24 hours where [h]:mm doesn't work

I'm building a spreadsheet to calculate aircraft flying hours which will exceed 24. I am aware of the [h]:mm format to force Excel to not use units of days.
I want to set a threshold number of hours which I will subtract a running total from. However with the [h]:mm format set if I enter 1 in the cell, for 1:00, instead it interprets it as 24:00 - one day.
How can I avoid this, so that I can do simple arithmetic with hours and minutes exceeding a 24 hour period?
Type 1:0 or even just 1: instead of just 1
If you type 1 excel interprets this as the value 1, which is date serial value to 1 day (actually 1/1/1900)
If you type something that looks like a time (eg contains a :) then excel interprets it as a string representation of a time and converts it to the corresponding serial value (0.041666667 or 1/24) and applies the format so it displays as 1:00

Resources