ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Formula and field types for calculating times (https://www.excelbanter.com/new-users-excel/175746-formula-field-types-calculating-times.html)

Hans-Martin Burger

Formula and field types for calculating times
 
Hello,

I don't get it how to format fields and apply some formula to calculate
with time-differences.

Example:
I want the difference of two time fields expressed as
decimal-number.

12:30 - 08:15 = 4.25 (4 hours and 15 minutes)

Gary''s Student

Formula and field types for calculating times
 
=24*("12:30"-"8:15")
and format as General
--
Gary''s Student - gsnu2007d

Niek Otten

Formula and field types for calculating times
 
To learn all about calculating with time, visit Chip Pearson's site:

http://www.cpearson.com/excel/datetime.htm#AddingTimes

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Hans-Martin Burger" wrote in message ...
| Hello,
|
| I don't get it how to format fields and apply some formula to calculate
| with time-differences.
|
| Example:
| I want the difference of two time fields expressed as
| decimal-number.
|
| 12:30 - 08:15 = 4.25 (4 hours and 15 minutes)



Matt Richardson

Formula and field types for calculating times
 
On Feb 6, 10:42 am, "Niek Otten" wrote:
To learn all about calculating with time, visit Chip Pearson's site:

http://www.cpearson.com/excel/datetime.htm#AddingTimes

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Hans-Martin Burger" wrote in ...

| Hello,
|
| I don't get it how to format fields and apply some formula to calculate
| with time-differences.
|
| Example:
| I want the difference of two time fields expressed as
| decimal-number.
|
| 12:30 - 08:15 = 4.25 (4 hours and 15 minutes)


If you have 12:30 in cell A1, 08:15 in cell B1, and then the formula
=A1-B1 in cell C1, Excel will give the response 04:15.

Is this what you mean? If you want it in a decimalised format, try
the following formula in cell C1:-

=HOUR(A1-B1)+MINUTE(A1-B1)/60

And ensure that the number format of the field is set to General or
number.

Hope this helps,
M.Richardson
http://teachr.blogspot.com


All times are GMT +1. The time now is 07:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com