A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

formula for adding up 3 different start and finish times



 
 
Thread Tools Display Modes
  #1  
Old May 24th, 2010, 04:09 PM posted to microsoft.public.excel.worksheet.functions
shazza
external usenet poster
 
Posts: 23
Default formula for adding up 3 different start and finish times

Hi. Can any one tell me the formula for adding up 3 different start and
finish times within a 24 hour period.

I have set up a time sheet that has shifts of Morning, Afternoon and Evening
i enter in my start and finish times for each shift but can not figure out
how to add them all together.
--
Thank you for reading my post. Hopefully you can answer my querie
  #2  
Old May 24th, 2010, 04:47 PM posted to microsoft.public.excel.worksheet.functions
Roger Govier[_8_]
external usenet poster
 
Posts: 338
Default formula for adding up 3 different start and finish times

Hi

With your data in A2:F2 enter in G2
=MOD(B2-A2,1)+MOD(D2-C2,1)+MOD(F2-E2,1)
Format G2 as hh:mm

The MOD part of the formula will deal with any shifts crossing the 24
hour barrier.

If you want your result in decimal hours, then you would need
=24*(MOD(B2-A2,1)+MOD(D2-C2,1)+MOD(F2-E2,1))
and format the cell to the number of decimals you require.
This is because Excel stores times as a fraction of a day (24 hours).
--
Regards
Roger Govier

Shazza wrote:
Hi. Can any one tell me the formula for adding up 3 different start and
finish times within a 24 hour period.

I have set up a time sheet that has shifts of Morning, Afternoon and Evening
i enter in my start and finish times for each shift but can not figure out
how to add them all together.

  #3  
Old May 24th, 2010, 06:38 PM posted to microsoft.public.excel.worksheet.functions
shazza
external usenet poster
 
Posts: 23
Default formula for adding up 3 different start and finish times

Hi Roger
thanks for your response. this one works if every cell is populated but on
quite a few occasions there will be nothing in some of the cells. An example
of what i have is as follows

Start Finish Start Finish Start Finish Total
05:00 12:00 17:00 00:00
09:00 13:00 14:00 17:00 18:00 11:00

So i am finding that on the days where no time has been entered then the
formula does not work.
--
Thank you for reading my post. Hopefully you can answer my querie


"Roger Govier" wrote:

Hi

With your data in A2:F2 enter in G2
=MOD(B2-A2,1)+MOD(D2-C2,1)+MOD(F2-E2,1)
Format G2 as hh:mm

The MOD part of the formula will deal with any shifts crossing the 24
hour barrier.

If you want your result in decimal hours, then you would need
=24*(MOD(B2-A2,1)+MOD(D2-C2,1)+MOD(F2-E2,1))
and format the cell to the number of decimals you require.
This is because Excel stores times as a fraction of a day (24 hours).
--
Regards
Roger Govier

Shazza wrote:
Hi. Can any one tell me the formula for adding up 3 different start and
finish times within a 24 hour period.

I have set up a time sheet that has shifts of Morning, Afternoon and Evening
i enter in my start and finish times for each shift but can not figure out
how to add them all together.

.

  #4  
Old May 24th, 2010, 09:14 PM posted to microsoft.public.excel.worksheet.functions
Roger Govier[_8_]
external usenet poster
 
Posts: 338
Default formula for adding up 3 different start and finish times

Hi

then try

=if(count(A2:B2)=2,MOD(B2-A2,1),0)+if count(C22)=2,
MOD(D2-C2,1),0)+if(count(E2:F2)=2,MOD(F2-E2,1),0)
--
Regards
Roger Govier

Roger Govier wrote:
Hi

With your data in A2:F2 enter in G2
=MOD(B2-A2,1)+MOD(D2-C2,1)+MOD(F2-E2,1)
Format G2 as hh:mm

The MOD part of the formula will deal with any shifts crossing the 24
hour barrier.

If you want your result in decimal hours, then you would need
=24*(MOD(B2-A2,1)+MOD(D2-C2,1)+MOD(F2-E2,1))
and format the cell to the number of decimals you require.
This is because Excel stores times as a fraction of a day (24 hours).
--
Regards
Roger Govier

Shazza wrote:
Hi. Can any one tell me the formula for adding up 3 different start
and finish times within a 24 hour period.

I have set up a time sheet that has shifts of Morning, Afternoon and
Evening
i enter in my start and finish times for each shift but can not figure
out how to add them all together.

  #5  
Old May 24th, 2010, 09:15 PM posted to microsoft.public.excel.worksheet.functions
Fred Smith[_4_]
external usenet poster
 
Posts: 2,386
Default formula for adding up 3 different start and finish times

You'll need to explain what "does not work" means, because Roger's formula
worked for me when I tested it, including the sample where there was no
start/finish time.

Regards,
Fred

"Shazza" wrote in message
...
Hi Roger
thanks for your response. this one works if every cell is populated but
on
quite a few occasions there will be nothing in some of the cells. An
example
of what i have is as follows

Start Finish Start Finish Start Finish Total
05:00 12:00 17:00 00:00
09:00 13:00 14:00 17:00 18:00 11:00

So i am finding that on the days where no time has been entered then the
formula does not work.
--
Thank you for reading my post. Hopefully you can answer my querie


"Roger Govier" wrote:

Hi

With your data in A2:F2 enter in G2
=MOD(B2-A2,1)+MOD(D2-C2,1)+MOD(F2-E2,1)
Format G2 as hh:mm

The MOD part of the formula will deal with any shifts crossing the 24
hour barrier.

If you want your result in decimal hours, then you would need
=24*(MOD(B2-A2,1)+MOD(D2-C2,1)+MOD(F2-E2,1))
and format the cell to the number of decimals you require.
This is because Excel stores times as a fraction of a day (24 hours).
--
Regards
Roger Govier

Shazza wrote:
Hi. Can any one tell me the formula for adding up 3 different start
and
finish times within a 24 hour period.

I have set up a time sheet that has shifts of Morning, Afternoon and
Evening
i enter in my start and finish times for each shift but can not figure
out
how to add them all together.

.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:48 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.