Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
evon
 
Posts: n/a
Default How to calculate no. of hours under different circumstances.

3 situations would be as follow, i set the formular like this is =IF(B1<A1,
24/24-A6+B6,B6-A6), both A & B using time format and C using number format.

A B C
Start Time End Time No. of hours
10:30 15:00 4.5
00:00 08:00 8.0
08:00 23:59 16.0 **Problem**

I can get the result for the first 2, but not the last one, any one can
help, many thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default How to calculate no. of hours under different circumstances.

What's the problem?

4.5
8
15.98333


is what I get using

=(B1-A1+(A1B1))*24

are you saying that you want to round, if so what's the rounding criteria?
Nearest .25 using decimal hours? If so

=ROUND((B1-A1+(A1B1))*24/0.25,0)*0.25

will return 16



--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon




"evon" wrote in message
...
3 situations would be as follow, i set the formular like this is =IF(B1<A1,
24/24-A6+B6,B6-A6), both A & B using time format and C using number
format.

A B C
Start Time End Time No. of hours
10:30 15:00 4.5
00:00 08:00 8.0
08:00 23:59 16.0 **Problem**

I can get the result for the first 2, but not the last one, any one can
help, many thanks!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default How to calculate no. of hours under different circumstances.

Hi!

Try this:

=(B6-A6+(B6<A6))*24

Copy down as needed.

Returns:

4.5
8
15.9833333333333

Biff

"evon" wrote in message
...
3 situations would be as follow, i set the formular like this is =IF(B1<A1,
24/24-A6+B6,B6-A6), both A & B using time format and C using number
format.

A B C
Start Time End Time No. of hours
10:30 15:00 4.5
00:00 08:00 8.0
08:00 23:59 16.0 **Problem**

I can get the result for the first 2, but not the last one, any one can
help, many thanks!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
evon
 
Posts: n/a
Default How to calculate no. of hours under different circumstances.

Yup, that is what i am looking for the rounding problem, and it works
perfectly would you explain a little bit the logic behind, many thanks!

Regards,
evon

"Peo Sjoblom" wrote:

What's the problem?

4.5
8
15.98333


is what I get using

=(B1-A1+(A1B1))*24

are you saying that you want to round, if so what's the rounding criteria?
Nearest .25 using decimal hours? If so

=ROUND((B1-A1+(A1B1))*24/0.25,0)*0.25

will return 16



--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon




"evon" wrote in message
...
3 situations would be as follow, i set the formular like this is =IF(B1<A1,
24/24-A6+B6,B6-A6), both A & B using time format and C using number
format.

A B C
Start Time End Time No. of hours
10:30 15:00 4.5
00:00 08:00 8.0
08:00 23:59 16.0 **Problem**

I can get the result for the first 2, but not the last one, any one can
help, many thanks!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate Hours and overtime by week gregt812 Excel Worksheet Functions 1 November 23rd 05 07:03 PM
How do I calculate hours in Excel Bobbi Prochnow [MSFT] New Users to Excel 0 October 31st 05 07:51 PM
calculate hours just can't figure it out monish74 Excel Worksheet Functions 1 February 13th 05 07:31 PM
calculate difference in time to hours Chris Excel Worksheet Functions 5 January 18th 05 06:07 PM
calculate average hours and minutes llstephens Excel Worksheet Functions 4 November 30th 04 03:47 PM


All times are GMT +1. The time now is 02:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"