Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 806
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
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)+(a2<a1))*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!


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
counting the number of times shown klh84 Excel Worksheet Functions 3 February 23rd 10 08:10 PM
Counting number of times a value occurs da Excel Discussion (Misc queries) 6 September 9th 08 03:51 PM
Counting the times a number appears Jennifer B[_2_] Excel Discussion (Misc queries) 2 July 17th 08 11:54 PM
Calculate number of hours between dates and times excluding Weekends [email protected] Excel Discussion (Misc queries) 1 October 21st 06 02:16 AM
number of hours between two date/times TBA Excel Discussion (Misc queries) 7 January 27th 06 12:12 AM


All times are GMT +1. The time now is 01:58 PM.

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

About Us

"It's about Microsoft Excel"