still having issues with converting hours:Min:sec into decimal :-(

hatbrox

New Member
Joined
Apr 24, 2006
Messages
5
Hi,

I went through a few examples from this website and others about converting duration (not time!) into decimals.
I'm using Excel for mac version 2011

I start with a new spreadsheet.
in Cell A1, I enter 38:59:00
in cell A2, I want to see 38.98
(I'm not interested in the seconds)
The 1st thing I notice is that in the formula bar, Excel shows for cell A1: 01/01/1900 14:23:00
I checked the format of the cell: A1 and it says: "Custom" and then "[h]:mm:ss"
A2 is formatted as: Number with 2 decimals

In A2, I tried the following formula and I get these results (after the "==>")
HOUR(A1)+MINUTE(A1)/60 ==> 14.98
24*MOD(A1,1) ==> 14.98
(HOUR(A1)*60)+MINUTE(A1)+(SECOND(A1)/60) ==> 899.00
(A1-INT(A1))*24 ==> 14.98

basically, Excel hides the First 24 hours, or the 1st day and displays the reminder: 14.98.
Indeed, 24+14.98 = 38.98

the above formulas work fine if the duration is less than 24 hours but not when above.

I want to see 38.98

thanks for suggestions.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top