LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
markx
 
Posts: n/a
Default Working Hours (formula & graph) - any elegant solution?

Hello everybody,

Schematically, I have the following problem:

A B C D
E
Arrival Go to Lunch Back from Lunch Departure Formula
08:00 12:00 13:00 17:00
normally: (b-a)+(d-c)

and then totals for the month at the bottom of the page. Totals for the day
are also presented on the graph (same page). I use 1904 system to avoid the
"error" result, getting (at some periods of the day) negative hours...

Basically it's ok, but the graph is "skipping" from positive to negative
area during the day (when we enter 08:00 at arrival, the total ((b-a)+(d-c))
will get negative). Any idea how to deal with that?

F. ex.
if we input only 08:00, the total should say that we have worked 0:00 hours
if we input 08:00 and 12:00, the total should say that we have worked 4:00
hours
if we input 08:00, 12:00 and 13:00 (everything but departure time), the
total should say that we have worked 4:00 hours
if we input 13:00 and 17:00 (working only in afternoon), the total should
say that we have worked 4:00 hours
if we input 08:00, 12:00, 13:00 and 17:00, the total should say that we have
worked 8:00 hours
if we input 08:00 and 16:00 (worked the whole day without the lunch break),
the total should say 8:00 hours

I know that we can always put embedded IF formulas, but it's not very
elegant and could be confusing... Do you have any ideas what is the best
solution for this kind of problem (or at least the best possible IF
statement)?

P.S. I'm not speaking about adding to that some kind of =NOW() formula and
making the totals and graphs indicating working hours with a big precision
and modifying every minute. That would be the best, however I suppose that
it's way too complicated...

Many thanks for any hints and solutions you could have,
Mark


 
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
VLOOKUP & Dates: Why is this Formula working? Ali Excel Worksheet Functions 1 January 18th 06 01:37 PM
i need to make a formula that adds up my hours after my 40 hours johnny rodriguez Excel Discussion (Misc queries) 5 October 26th 05 05:03 AM
Working hours Hani Muhtadi Excel Discussion (Misc queries) 1 September 13th 05 09:48 PM
Help an Excel novice with a graph formula? Jeff C Excel Discussion (Misc queries) 9 July 23rd 05 01:21 PM
Graph from a PIVOT table: update not working. Please Help! Marcus Excel Discussion (Misc queries) 0 June 7th 05 05:53 PM


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