[EXCEL 2000] Convert time to decimal

Solved
shp Posted messages 16 Status Membre -  
 Mcnell1 -
Hello,

I have a table that includes, among other columns:
- duration (format [h]:mm:ss)
- hourly_rate
- total_cost

What is the function that converts the duration into a decimal (e.g., 2:30 to 2.5)? This would allow me to calculate total_cost with the formula =duration*hourly_rate.

Thank you for your reply

shp

7 réponses

domi
 
An easy and effective solution.

The cell to convert example (cell A4): 02H30

In the adjacent cell B4, you enter = A4*24, format the cell as a number, and you're good to go.

To convert backwards:

The cell to convert example (cell A4): 2.50

In the adjacent cell B4, you enter = A4/24, format the cell as time, and you're good to go.

If you can't do it, give me your address and I'll send you a file with the example.

It's not written anywhere, but I had this problem and found this trick

Best regards.
79
domino
 
Thank you very much, a thousand times thank you..... I am very happy, you took a huge thorn out of my side, it works very well.
0
loulou
 
Thank you, it was a great help to me!
0
Zaynab
 
Thank you very much.
0
Euralie
 
Thank you very much!
0
Mcnell1
 
Thank you, champion.
0