#1   Report Post  
Kevin
 
Posts: n/a
Default help with formula

Hi
I have a worksheet with column C (start time) & column D (end time).
(C1:D50)
e.g
C D
07:45 08:50
11:50 12:50
In Cells A1 and B1 i have the start break time and end break time
'08:00' and '08:20' for the first break.
In Cells A2 and B2 i have the start break time and end break time
'12:00' and '12:30' for the first break.

What i want to do is calculate the amount of time lost but exclude
both break times


can anyone help?
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

Chip Pearson has a timehseet example with formulas on his
website:

http://www.cpearson.com/excel/overtime.htm

HTH
Jason
Atlanta, GA

-----Original Message-----
Hi
I have a worksheet with column C (start time) & column D

(end time).
(C1:D50)
e.g
C D
07:45 08:50
11:50 12:50
In Cells A1 and B1 i have the start break time and end

break time
'08:00' and '08:20' for the first break.
In Cells A2 and B2 i have the start break time and end

break time
'12:00' and '12:30' for the first break.

What i want to do is calculate the amount of time lost

but exclude
both break times


can anyone help?
.

  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

paste this formula into cell E1

=60*24*((D1-C1)-IF(AND(D1$A$1,D1<$B$1),D1-$A$1,0)-IF(AND(C1$A$1,C1<$B$1),$B$1-C1,0))

"Kevin" wrote:

Hi
I have a worksheet with column C (start time) & column D (end time).
(C1:D50)
e.g
C D
07:45 08:50
11:50 12:50
In Cells A1 and B1 i have the start break time and end break time
'08:00' and '08:20' for the first break.
In Cells A2 and B2 i have the start break time and end break time
'12:00' and '12:30' for the first break.

What i want to do is calculate the amount of time lost but exclude
both break times


can anyone help?

  #4   Report Post  
Duke Carey
 
Posts: n/a
Default

Oops, I just tested that and it fails in the situation where both the start
time is before 8:00AM and the end date is after 8:20AM. Thus, we need to add
one more IF() to the formula. Try this one istead

=60*24*((D1-C1)-IF(AND(D1$A$1,D1<$B$1),D1-$A$1,0)-IF(AND(C1$A$1,C1<$B$1),$B$1-C1,0)-IF(AND(C1<$A$1,D1$B$1),$B$1-$A$1,0))


"Duke Carey" wrote:

paste this formula into cell E1

=60*24*((D1-C1)-IF(AND(D1$A$1,D1<$B$1),D1-$A$1,0)-IF(AND(C1$A$1,C1<$B$1),$B$1-C1,0))

"Kevin" wrote:

Hi
I have a worksheet with column C (start time) & column D (end time).
(C1:D50)
e.g
C D
07:45 08:50
11:50 12:50
In Cells A1 and B1 i have the start break time and end break time
'08:00' and '08:20' for the first break.
In Cells A2 and B2 i have the start break time and end break time
'12:00' and '12:30' for the first break.

What i want to do is calculate the amount of time lost but exclude
both break times


can anyone help?

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
IF & VLOOKUP FORMULA taxmom Excel Worksheet Functions 3 March 2nd 05 03:35 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
revert formula insertion to old method Don't be a pain in the ass Setting up and Configuration of Excel 0 January 24th 05 01:49 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM


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