Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Figuring total # of hours between multiple times

I am creating a work schedule template that will total the number of hours an
individual is scheduled to work for the week. The template will reflect the
work schedule for two weeks for a number of individuals. I have entered a
formula that will calculate the total if the cell contents are all time
values. My problem is that any given day can have "OFF", "VAC" or "HOL" in
one of the cells. This returns a "#VALUE!" error. Is there any way to imbed
an additional formula to ignore any cells with text or even with the specific
values listed above. Here is a copy of the information I am working with:
15-Jul 16-Jul 17-Jul Hours
06:00 16:00 07:00 16:00 OFF #VALUE!

The formula enter is: =((K3-J3)*24)+((M3-L3)*24)+((O3-N3)*24)
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Figuring total # of hours between multiple times

The time ranges DO span past midnight.

In that case, I think you'd be better off doing a daily total and then
getting the weekly/bi-weekly total from the daily total. If you wnat to use
a single formula that accounts for both text entries like Vac and has to
account for times past midnight, that formula would be long and somewhat
complex. For example, array entered** :

=IF(MOD(COUNT(J3:Q3),2)=1,"",(SUM(IF(ISNUMBER(K3:Q 3),IF(MOD(COLUMN(K3:Q3),2)=1,IF(K3:Q3<J3:P3,K3:Q3+ 1,K3:Q3))))-SUM(IF(ISNUMBER(J3:P3),IF(MOD(COLUMN(J3:P3),2)=0,J 3:P3))))*24)

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

Not real pretty, is it? <g

To get the daily total accounting for text entries and times past midnight:

J3 = 7:00 PM
K3 = 3:00 AM

=IF(COUNT(J3:K3)=2,MOD(K3-J3,1)*24,"")

Then the weekly/bi-weekly total would be a simple SUM formula:

=SUM(daily_total_range)


--
Biff
Microsoft Excel MVP


"R P Wilson" wrote in message
...
The time ranges DO span past midnight.

"T. Valko" wrote:

Provided that none of the time ranges span past midnight. For example:

5:00 PM - 1:00 AM

=(SUM(O3,M3,K3)-SUM(N3,L3,J3))*24

Format as General or Number

--
Biff
Microsoft Excel MVP


"R P Wilson" <R P wrote in message
...
I am creating a work schedule template that will total the number of
hours
an
individual is scheduled to work for the week. The template will
reflect
the
work schedule for two weeks for a number of individuals. I have
entered a
formula that will calculate the total if the cell contents are all time
values. My problem is that any given day can have "OFF", "VAC" or
"HOL"
in
one of the cells. This returns a "#VALUE!" error. Is there any way to
imbed
an additional formula to ignore any cells with text or even with the
specific
values listed above. Here is a copy of the information I am working
with:
15-Jul 16-Jul 17-Jul Hours
06:00 16:00 07:00 16:00 OFF #VALUE!

The formula enter is: =((K3-J3)*24)+((M3-L3)*24)+((O3-N3)*24)






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
How do I calculate total pay from pay rate times hours and minutes Rufus Excel Discussion (Misc queries) 5 May 1st 23 07:45 PM
In Excell how can i get a total hours worked value from 2 times? Ronnie Kray Excel Worksheet Functions 11 September 9th 07 07:11 PM
multiply hours/minutes times dollars for total dollar amount Anakin0303 Excel Discussion (Misc queries) 1 December 12th 05 06:43 PM
Figuring hours scott45 Excel Worksheet Functions 0 August 29th 05 03:31 PM
Figuring military time for total hours David Nelms Excel Worksheet Functions 3 July 5th 05 05:00 PM


All times are GMT +1. The time now is 04:32 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"