#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Calculating Time

I am trying to create a time sheet with the following columns: Time In, Time
Out, Lunch and Hours Worked. The Time In and Time Out columns are formatted
with military time and the Lunch is a straight time number as the time may
vary. I needed to have a formula that calculated the time worked (end time
minus start time minus the time taken for lunch.) I have created the
following formula to calculate the hours worked:
=IF(B15=0,"",((C15-INT(C15))-(B15-INT(B15)))-(D15-INT(D15)))

This formula functions properly, giving me the total hours worked for each
day. However, my problem is then summing the hours worked for the entire
week. I'm given an incorrect number when I use a standard =sum(E1:E5)
formula. I have tried various other formulas and cannot seem to find a way
to get the sum of the results from the above formula.

Is there anyone that can help?! Please!?

With much thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Calculating Time

Try formatting the result of your sum formula as [h]:mm.

The brackets keep the hours from rolling over at 24.

For example, formatted as h:mm

If the sum is 23:00 then this displays properly.

If the sum was 25:00 this would display as 1:00.

[h]:mm the brackets keep that from happening.

--
Biff
Microsoft Excel MVP


" wrote in
message ...
I am trying to create a time sheet with the following columns: Time In,
Time
Out, Lunch and Hours Worked. The Time In and Time Out columns are
formatted
with military time and the Lunch is a straight time number as the time may
vary. I needed to have a formula that calculated the time worked (end
time
minus start time minus the time taken for lunch.) I have created the
following formula to calculate the hours worked:
=IF(B15=0,"",((C15-INT(C15))-(B15-INT(B15)))-(D15-INT(D15)))

This formula functions properly, giving me the total hours worked for each
day. However, my problem is then summing the hours worked for the entire
week. I'm given an incorrect number when I use a standard =sum(E1:E5)
formula. I have tried various other formulas and cannot seem to find a
way
to get the sum of the results from the above formula.

Is there anyone that can help?! Please!?

With much thanks!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Calculating Time

Never mind. Figured it out... Should have kept reading - thanks Bob Phillips
for the answer in a previous post.

Answer is: use the regular sum formula, but then format the cell: [h].mm
That worked! :)

" wrote:

I am trying to create a time sheet with the following columns: Time In, Time
Out, Lunch and Hours Worked. The Time In and Time Out columns are formatted
with military time and the Lunch is a straight time number as the time may
vary. I needed to have a formula that calculated the time worked (end time
minus start time minus the time taken for lunch.) I have created the
following formula to calculate the hours worked:
=IF(B15=0,"",((C15-INT(C15))-(B15-INT(B15)))-(D15-INT(D15)))

This formula functions properly, giving me the total hours worked for each
day. However, my problem is then summing the hours worked for the entire
week. I'm given an incorrect number when I use a standard =sum(E1:E5)
formula. I have tried various other formulas and cannot seem to find a way
to get the sum of the results from the above formula.

Is there anyone that can help?! Please!?

With much thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Calculating Time

I was wondering when you calculate time entries, do they need to be in
military time, or can they be in regular time? I need to have it calculate
the time as:
11:00 in
1:45 out
I there a formula for that?
--
Sandi


" wrote:

I am trying to create a time sheet with the following columns: Time In, Time
Out, Lunch and Hours Worked. The Time In and Time Out columns are formatted
with military time and the Lunch is a straight time number as the time may
vary. I needed to have a formula that calculated the time worked (end time
minus start time minus the time taken for lunch.) I have created the
following formula to calculate the hours worked:
=IF(B15=0,"",((C15-INT(C15))-(B15-INT(B15)))-(D15-INT(D15)))

This formula functions properly, giving me the total hours worked for each
day. However, my problem is then summing the hours worked for the entire
week. I'm given an incorrect number when I use a standard =sum(E1:E5)
formula. I have tried various other formulas and cannot seem to find a way
to get the sum of the results from the above formula.

Is there anyone that can help?! Please!?

With much thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Calculating Time

You can use a regular 12 hour clock *but* you have to include the AM/PM. If
you use a 12 hour clock and don't include the AM/PM Excel will default to
AM. For example:

A1 = 6:00

You might intend for that to mean 6:00 PM but since you didn't include the
PM Excel will treat it as 6:00 AM.

So:

A1 = 11:00 AM
A2 = 1:45 PM

Then:

=A2-A1

If the times might span past midnight then it's a little different:

A1 = 11:00 PM
A2 = 1:45 AM

Then:

=MOD(A2-A1,1)

--
Biff
Microsoft Excel MVP


"Sandi" wrote in message
...
I was wondering when you calculate time entries, do they need to be in
military time, or can they be in regular time? I need to have it
calculate
the time as:
11:00 in
1:45 out
I there a formula for that?
--
Sandi


" wrote:

I am trying to create a time sheet with the following columns: Time In,
Time
Out, Lunch and Hours Worked. The Time In and Time Out columns are
formatted
with military time and the Lunch is a straight time number as the time
may
vary. I needed to have a formula that calculated the time worked (end
time
minus start time minus the time taken for lunch.) I have created the
following formula to calculate the hours worked:
=IF(B15=0,"",((C15-INT(C15))-(B15-INT(B15)))-(D15-INT(D15)))

This formula functions properly, giving me the total hours worked for
each
day. However, my problem is then summing the hours worked for the entire
week. I'm given an incorrect number when I use a standard =sum(E1:E5)
formula. I have tried various other formulas and cannot seem to find a
way
to get the sum of the results from the above formula.

Is there anyone that can help?! Please!?

With much thanks!





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Calculating Time

Still coming up with a value error..
--
Sandi


"T. Valko" wrote:

You can use a regular 12 hour clock *but* you have to include the AM/PM. If
you use a 12 hour clock and don't include the AM/PM Excel will default to
AM. For example:

A1 = 6:00

You might intend for that to mean 6:00 PM but since you didn't include the
PM Excel will treat it as 6:00 AM.

So:

A1 = 11:00 AM
A2 = 1:45 PM

Then:

=A2-A1

If the times might span past midnight then it's a little different:

A1 = 11:00 PM
A2 = 1:45 AM

Then:

=MOD(A2-A1,1)

--
Biff
Microsoft Excel MVP


"Sandi" wrote in message
...
I was wondering when you calculate time entries, do they need to be in
military time, or can they be in regular time? I need to have it
calculate
the time as:
11:00 in
1:45 out
I there a formula for that?
--
Sandi


" wrote:

I am trying to create a time sheet with the following columns: Time In,
Time
Out, Lunch and Hours Worked. The Time In and Time Out columns are
formatted
with military time and the Lunch is a straight time number as the time
may
vary. I needed to have a formula that calculated the time worked (end
time
minus start time minus the time taken for lunch.) I have created the
following formula to calculate the hours worked:
=IF(B15=0,"",((C15-INT(C15))-(B15-INT(B15)))-(D15-INT(D15)))

This formula functions properly, giving me the total hours worked for
each
day. However, my problem is then summing the hours worked for the entire
week. I'm given an incorrect number when I use a standard =sum(E1:E5)
formula. I have tried various other formulas and cannot seem to find a
way
to get the sum of the results from the above formula.

Is there anyone that can help?! Please!?

With much thanks!




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Calculating Time

Thank you, thank you T...I feel real stupid but it worked great!
--
Sandi


"T. Valko" wrote:

You can use a regular 12 hour clock *but* you have to include the AM/PM. If
you use a 12 hour clock and don't include the AM/PM Excel will default to
AM. For example:

A1 = 6:00

You might intend for that to mean 6:00 PM but since you didn't include the
PM Excel will treat it as 6:00 AM.

So:

A1 = 11:00 AM
A2 = 1:45 PM

Then:

=A2-A1

If the times might span past midnight then it's a little different:

A1 = 11:00 PM
A2 = 1:45 AM

Then:

=MOD(A2-A1,1)

--
Biff
Microsoft Excel MVP


"Sandi" wrote in message
...
I was wondering when you calculate time entries, do they need to be in
military time, or can they be in regular time? I need to have it
calculate
the time as:
11:00 in
1:45 out
I there a formula for that?
--
Sandi


" wrote:

I am trying to create a time sheet with the following columns: Time In,
Time
Out, Lunch and Hours Worked. The Time In and Time Out columns are
formatted
with military time and the Lunch is a straight time number as the time
may
vary. I needed to have a formula that calculated the time worked (end
time
minus start time minus the time taken for lunch.) I have created the
following formula to calculate the hours worked:
=IF(B15=0,"",((C15-INT(C15))-(B15-INT(B15)))-(D15-INT(D15)))

This formula functions properly, giving me the total hours worked for
each
day. However, my problem is then summing the hours worked for the entire
week. I'm given an incorrect number when I use a standard =sum(E1:E5)
formula. I have tried various other formulas and cannot seem to find a
way
to get the sum of the results from the above formula.

Is there anyone that can help?! Please!?

With much thanks!




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Calculating Time

Ok, glad you got it straightened out. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Sandi" wrote in message
...
Thank you, thank you T...I feel real stupid but it worked great!
--
Sandi


"T. Valko" wrote:

You can use a regular 12 hour clock *but* you have to include the AM/PM.
If
you use a 12 hour clock and don't include the AM/PM Excel will default to
AM. For example:

A1 = 6:00

You might intend for that to mean 6:00 PM but since you didn't include
the
PM Excel will treat it as 6:00 AM.

So:

A1 = 11:00 AM
A2 = 1:45 PM

Then:

=A2-A1

If the times might span past midnight then it's a little different:

A1 = 11:00 PM
A2 = 1:45 AM

Then:

=MOD(A2-A1,1)

--
Biff
Microsoft Excel MVP


"Sandi" wrote in message
...
I was wondering when you calculate time entries, do they need to be in
military time, or can they be in regular time? I need to have it
calculate
the time as:
11:00 in
1:45 out
I there a formula for that?
--
Sandi


" wrote:

I am trying to create a time sheet with the following columns: Time
In,
Time
Out, Lunch and Hours Worked. The Time In and Time Out columns are
formatted
with military time and the Lunch is a straight time number as the time
may
vary. I needed to have a formula that calculated the time worked (end
time
minus start time minus the time taken for lunch.) I have created the
following formula to calculate the hours worked:
=IF(B15=0,"",((C15-INT(C15))-(B15-INT(B15)))-(D15-INT(D15)))

This formula functions properly, giving me the total hours worked for
each
day. However, my problem is then summing the hours worked for the
entire
week. I'm given an incorrect number when I use a standard =sum(E1:E5)
formula. I have tried various other formulas and cannot seem to find
a
way
to get the sum of the results from the above formula.

Is there anyone that can help?! Please!?

With much thanks!






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
Calculating Time with Date/Time checking in formula cmatera Excel Worksheet Functions 2 August 11th 08 01:38 PM
Calculating Regular time, overtime and double time Brian Smith Excel Worksheet Functions 5 November 9th 07 10:32 PM
calculating timesheet, time-in/time-out = total hours & minutes, . Steve Lindsay Excel Worksheet Functions 13 November 8th 06 03:45 PM
Calculating effective time from start/end date+time Stefan Stridh Excel Worksheet Functions 8 November 27th 04 03:50 PM


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