# Displaying Days as Hours

#### Kizzz

##### New Member
I'm trying to format cells in hours:minutes (HH:MM) so that days show up as hours. In other words, if you want to enter 30 hours, the cell would show 30:00 instead of just adding a day and calling it 6:00. I have no need for the dates themselves, I just need the hours:minutes relative to a starting point.

Any ideas?

### Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

#### fairwinds

##### MrExcel MVP
Welcome!

Custom format as:

[h]:mm

#### Kizzz

##### New Member
Thanks Fairwinds. That solved part of my problem. I'm trying to allow a user to enter "days" "hour" "minutes" and "seconds" in different cells, and then have Excel return the total time in the format of hh:mm:ss. I calculate the total hours in another cell (days * 24 + hours) and then try to use that cell to create my time.

Formatting the cell for [hh]:mm:ss works if I enter the data in the cell itself, but the "TIME" function divides all of the hours greater than 23 by 24 and returns the remainder as the hour value.

From the excel help:
"Hour is a number from 0 (zero) to 32767 representing the hour. Any value greater than 23 will be divided by 24 and the remainder will be treated as the hour value. For example, TIME(27,0,0) = TIME(3,0,0) = .125 or 3:00 AM."

Does anybody know a way around this or another formula that will read my total hours (greater than 24)/minutes/seconds and return to me "hh:mm:ss" with the hours being total hours elapsed?

#### fairwinds

##### MrExcel MVP
You could do like this:

Format as you describe.
Book1
ABCDEF
1DaysHoursMinuteSeconds
235202577:20:25
Sheet1

Replies
1
Views
143
Replies
1
Views
92
Replies
2
Views
192
Replies
7
Views
222
Replies
5
Views
120

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,152,480
Messages
5,770,341
Members
425,612
Latest member
martinijr

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back