From: 46Pam on 23 Apr 2010 11:36 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!
From: Bernd P on 23 Apr 2010 11:47 Hello, I suggest to call my UDF count_hours with two different timetables: http://sulprobil.com/html/count_hours.html Regards, Bernd
From: Fred Smith on 23 Apr 2010 16:37 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" <46Pam(a)discussions.microsoft.com> wrote in message news:786A2DB5-EBD2-495C-BCD4-F5F884B8CE36(a)microsoft.com... > 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!
|
Pages: 1 Prev: Print Entire workbook problem Next: lookup an address in a worksheet |