We have a dataset of some projects and how long they took in seconds. We are going to convert these seconds into hours and minutes.
Method 1 – Dividing with a Numeric Value to Convert Seconds to Hours and Minutes in Excel
Steps:
- Choose the cell D5.
- Apply the following formula:
=C5/(60*60*24)
- Press Enter to get the output.
- Pull the fill handle down to fill all the cells.
- Select all the output cells and press Ctrl + 1.
- A new window named Format Cells will appear.
- Select Custom and then choose h:mm from the Type section.
- Press OK to continue.
- Here’s the result.
Read More: How to Convert Seconds to Minutes in Excel
Method 2 – Applying the CONVERT Function to Convert Seconds to Hours and Minutes
Steps:
- Choose cell D5 to apply the following formula:
=CONVERT(C5,"sec","day")
- Hit the Enter button and drag down the fill handle to fill.
- Select the output cells and press Ctrl + 1 to change the format.
- Choose h:mm from the Custom option and press OK.
- Here’s the result.
Read More: How to Convert Minutes to Seconds in Excel
Method 3 – Combining TEXT and INT Functions
Steps:
- Select cell D5 and insert the following formula into it:
=TEXT((C5/86400)-INT(C5/86400),"h:mm")
- The INT function changes decimal values to integer values.
- The TEXT function converts the time to the format h:mm.
- Click the Enter button and drag down the fill handle.
Read More: How to Convert Minutes to Hours and Minutes in Excel
Method 4 – Use the INT Function to Convert Seconds to Hours and Minutes in Excel
Steps:
- Choose cell D5 and insert the following:
=INT(C5/3600)&":"&INT(((C5/3600)-INT(C5/3600))*60)
- =INT(((C5/3600) calculates the hours and rounds them down.
- =INT(((C5/3600)-INT(C5/3600))*60) calculates the minutes value by calculating the total hours as a decimal value and removing the integer part, then multiplying by 60 and rounding down.
- Press the Enter button and pull the fill handle down to fill all the cells.
Read More: How to Convert Milliseconds to Seconds in Excel
How to Apply Formula to Convert Seconds to Hours, Minutes, and Seconds in Excel
Steps:
- In cell D5, apply this formula:
=TEXT(C5/86400,CHOOSE(MATCH(C5,{0,60,3600},1),"s ""sec""","m ""min"" s ""sec""","[h] ""hrs"" m ""min"" s ""sec"""))
- MATCH(C5,{0,60,3600},1) → extracts the position in an array matching the total value. C5 is the lookup_value and {0,60,3600} is the lookup_array argument from where it is matched. “1” is the match_type argument indicating the less than criteria.
- The output is “3”.
- CHOOSE(3,”s “”sec”””,”m “”min”” s “”sec”””,”[h] “”hrs”” m “”min”” s “”sec”””)) → in this part “3” is the index_num while “s “”sec”””,”m “”min”” s “”sec”””,”[h] “”hrs”” m “”min”” s “”sec””” represents the value1, value2, value3 inside the string.
- Confirming output → [h] “hrs” m “min” s “sec”
- TEXT(C5/86400,”[h] “”hrs”” m “”min”” s “”sec”””) → here it will convert a text value into number format.
- The output from “C5/86400” will be shown to “[h] “”hrs”” m “”min”” s “”sec””” this format.
- The output stands to “0.0512”
- Our final output is 1 hrs 13 mins 45 sec.
- Press Enter and drag down the fill handle.
Read More: Excel Convert Seconds to hh mm ss
Things to Remember
- You can also go to the Format Cells feature from the Number Format option in the home ribbon.
Download the Practice Workbook
Related Articles
- How to Convert Minutes to Days in Excel
- How to Convert Minutes to Tenths of an Hour in Excel
- How to Convert Minutes to Hundredths in Excel
- How to Convert Minutes to Decimal in Excel
<< Go Back to Convert Time to Hours | Time Conversion | Date-Time in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!