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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to do a formula counting the number of hours between 2 times?



 
 
Thread Tools Display Modes
  #1  
Old April 23rd, 2010, 04:36 PM posted to microsoft.public.excel.misc
46Pam
external usenet poster
 
Posts: 1
Default How to do a formula counting the number of hours between 2 times?

We have some employees who work during a time which has a different hourly
rate than their usual rate. How can we do a formula that counts the number of
hours between 11 PM and 6 AM? The cells it would be looking at are coming
from an input log's cells that are formatted like this- 11:00 PM. We know how
to make it count all hours worked, but we want to say "if there are hours
between 11 PM and 6 AM, tell us how many there were.
Thanks!
  #2  
Old April 23rd, 2010, 04:47 PM posted to microsoft.public.excel.misc
Bernd P
external usenet poster
 
Posts: 613
Default How to do a formula counting the number of hours between 2 times?

Hello,

I suggest to call my UDF count_hours with two different timetables:
http://sulprobil.com/html/count_hours.html

Regards,
Bernd
  #3  
Old April 23rd, 2010, 09:37 PM posted to microsoft.public.excel.misc
Fred Smith[_4_]
external usenet poster
 
Posts: 2,386
Default How to do a formula counting the number of hours between 2 times?

If your start time is in A1, and your end time in A2, use:
=((a2-a1)+(a2a1))*24
to get the number of hours. Format as a number.

It doesn't matter how your times are formatted as long as they are times
(ie, not text).

Regards,
Fred

"46Pam" wrote in message
...
We have some employees who work during a time which has a different hourly
rate than their usual rate. How can we do a formula that counts the number
of
hours between 11 PM and 6 AM? The cells it would be looking at are coming
from an input log's cells that are formatted like this- 11:00 PM. We know
how
to make it count all hours worked, but we want to say "if there are hours
between 11 PM and 6 AM, tell us how many there were.
Thanks!


 




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 09:00 PM.


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