0
Thanks

A few words of thanks would be greatly appreciated.

Excel - Convert hours in decimal



Issue


I have a table with following columns:
- Duration (format [h]: mm: ss)
- Cost_Duration
I need a function that converts the time in a decimal (eg 2:30 in 2.5).

Solution


    A     B      C      D      E
1  8:30 12:00  14:00  16:00  =(B1-A1)+(D1-C1)
2  8:30 12:00  14:00  16:00  =(B2-A2)+(D2-C2)
3  8:30 12:00  14:00  16:00  =(B3-A3)+(D3-C3)
4  8:30 12:00  14:00  16:00  =(B4-A4)+(D4-C4)
5  8:30 12:00  14:00  16:00  =(B5-A5)+(D5-C5)
6 total                      =sum(E1:E5)

All the cells must be formatted as follows:
"h:mm" or "[h]:mm"


Thanks to gbinforme for this tip.
0
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Excel - Convert hours in decimal », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).

0 Comments