A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count the number of hours/durations



 
 
Thread Tools Display Modes
  #1  
Old February 8th, 2010, 07:59 AM posted to microsoft.public.excel.worksheet.functions
Jafferi[_2_]
external usenet poster
 
Posts: 23
Default Count the number of hours/durations



Cell A1 ---- Jan 1, 2010
Cell A2 ---- 10:58 [AM]
Cell B1 ---- Jan 3, 2010
Cell B2 ---- 22:10 [PM]

What is the formula that I can use to give me the results of no of hours
between Jan 1, 2010 at 10:58AM to Jan 3, 2010 22:10 PM?
  #2  
Old February 8th, 2010, 08:28 AM posted to microsoft.public.excel.worksheet.functions
David-Melbourne-Australia[_2_]
external usenet poster
 
Posts: 8
Default Count the number of hours/durations

Hi Jafferi

The following formula does the job:
=(A3-A1+A4-A2)*24

This works out precisely how many hours down to the decimal places.

If you want the number of whole hours:
=int((A3-A1+A4-A2)*24)

If you want the number of whole hours rounded to the nearest hour:
=round((A3-A1+A4-A2)*24,0)

Hope this helps.

David


"Jafferi" wrote:



Cell A1 ---- Jan 1, 2010
Cell A2 ---- 10:58 [AM]
Cell B1 ---- Jan 3, 2010
Cell B2 ---- 22:10 [PM]

What is the formula that I can use to give me the results of no of hours
between Jan 1, 2010 at 10:58AM to Jan 3, 2010 22:10 PM?

  #3  
Old February 8th, 2010, 08:37 AM posted to microsoft.public.excel.worksheet.functions
Per Jessen
external usenet poster
 
Posts: 686
Default Count the number of hours/durations

Hi

Use this formula and format the formla cell a Custom [h]:mm

=B1-A1+(B2-A2)

Regards,
Per

"Jafferi" skrev i meddelelsen
...


Cell A1 ---- Jan 1, 2010
Cell A2 ---- 10:58 [AM]
Cell B1 ---- Jan 3, 2010
Cell B2 ---- 22:10 [PM]

What is the formula that I can use to give me the results of no of hours
between Jan 1, 2010 at 10:58AM to Jan 3, 2010 22:10 PM?


  #4  
Old February 8th, 2010, 12:49 PM posted to microsoft.public.excel.worksheet.functions
Bernd P
external usenet poster
 
Posts: 613
Default Count the number of hours/durations

Hello,

I suggest to use my UDF count_hours:
http://sulprobil.com/html/count_hours.html

Regards,
Bernd
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:48 AM.


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