ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do i calculate the number of hours between 11:00 am & 4:00 pm (https://www.excelbanter.com/excel-worksheet-functions/122532-how-do-i-calculate-number-hours-between-11-00-am-4-00-pm.html)

connie

how do i calculate the number of hours between 11:00 am & 4:00 pm
 
I need a formula or function that will calculate the number of hours between
11:00 am and 4:00 pm = 5 hours.

Thanks, Connie Smith

Bob Phillips

how do i calculate the number of hours between 11:00 am & 4:00 pm
 
=int((B1-A1)*24)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Connie" wrote in message
...
I need a formula or function that will calculate the number of hours
between
11:00 am and 4:00 pm = 5 hours.

Thanks, Connie Smith




Roger Govier

how do i calculate the number of hours between 11:00 am & 4:00 pm
 
Hi

With end time in B1 and start time in A1 try
=B1-A1
Format the cell FormatCellsNumberCustom hh:mm

If you want to sum all of the resulting values, then that cell would
need to be formatted at [h]:mm to allow it to total past 24 hours.

--
Regards

Roger Govier


"Connie" wrote in message
...
I need a formula or function that will calculate the number of hours
between
11:00 am and 4:00 pm = 5 hours.

Thanks, Connie Smith




nospam

how do i calculate the number of hours between 11:00 am & 4:00pm
 
Bob Phillips wrote:
=int((B1-A1)*24)

I tried this with 9:45 AM start time and 12:00 PM end time and it
calculates 2 hrs not 2.25. Any way to make it do that?

Pete_UK

how do i calculate the number of hours between 11:00 am & 4:00 pm
 
The INT function will return an integer value. If you want to display
fractions of an hour then just remove that and format the cell as
number with 2 dp, i.e.:

=(B1-A1)*24

Hope Bob doesn't mind me taking this up - he's probably in bed by now
!! <bg

Pete

nospam wrote:

Bob Phillips wrote:
=int((B1-A1)*24)

I tried this with 9:45 AM start time and 12:00 PM end time and it
calculates 2 hrs not 2.25. Any way to make it do that?




All times are GMT +1. The time now is 07:47 PM.

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