Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.setup
PJ PJ is offline
external usenet poster
 
Posts: 112
Default How do I sum up a column hours, like 9:30am - 5:30pm, in Excel?

I'm doing a timesheet for my niece and am having a problem (I'm not very
skilled at Excel - yet!). She needs to write down her entries in one cell,
like 9:30am-5:30pm, or 8:00pm-4:00am, with a total at the bottom of the
dcolumn showing that day's total hours worked by the various employees. How
do I go about it?
  #2   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 10,593
Default How do I sum up a column hours, like 9:30am - 5:30pm, in Excel?

What she should do is enter the start time in one cell, the end time in
another, and than have a simple subtraction in a third to calculate the days
hours. Then just sum the days hours to get the weeks hours (and format as
[h]:mm so as not to cycle through 24 hours).

Don't enter both in one cell, it is just too convoluted to extract again.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"PJ" wrote in message
...
I'm doing a timesheet for my niece and am having a problem (I'm not very
skilled at Excel - yet!). She needs to write down her entries in one

cell,
like 9:30am-5:30pm, or 8:00pm-4:00am, with a total at the bottom of the
dcolumn showing that day's total hours worked by the various employees.

How
do I go about it?



  #3   Report Post  
Posted to microsoft.public.excel.setup
PJ PJ is offline
external usenet poster
 
Posts: 112
Default How do I sum up a column hours, like 9:30am - 5:30pm, in Excel

Thanks Bob! It worked on most of the problems, but not all. It didn't
funciton correctly on the type of problem where the employee started in the
evening and left work in the morning (night shift - 22:30 to 6:30). It came
out as a string of pound signs. How can I fix this problem. I tried some of
the ideans from the Excel BB area, but they didn't work either. Anything you
can suggest would be better than what I have (or haven't) come up with.
Thanks tons.
PJ

"Bob Phillips" wrote:

What she should do is enter the start time in one cell, the end time in
another, and than have a simple subtraction in a third to calculate the days
hours. Then just sum the days hours to get the weeks hours (and format as
[h]:mm so as not to cycle through 24 hours).

Don't enter both in one cell, it is just too convoluted to extract again.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"PJ" wrote in message
...
I'm doing a timesheet for my niece and am having a problem (I'm not very
skilled at Excel - yet!). She needs to write down her entries in one

cell,
like 9:30am-5:30pm, or 8:00pm-4:00am, with a total at the bottom of the
dcolumn showing that day's total hours worked by the various employees.

How
do I go about it?




  #4   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 10,593
Default How do I sum up a column hours, like 9:30am - 5:30pm, in Excel

That is because when you subtract the end tine from the start time, you are
dealing with negative time (Excel stores time as a fraction of 1 day, so you
are subtracting 0.270833 from 0.9375, which is negative, and as time can't
be negative (at least in this universe), Excel objects as refuses to display
it.

There are two possible solutions:

- test if the start date is after the end date, =IF(A1B1,1-(A1-B1),B1-A1)

- use a more generic formula of =MOD(B1-A1,1)

You could actually switch to the 1904 date system
(ToolsOptionsCalculation1904 date system), which does allow negative
time, but you would still need a formula to transform the negative time
result, so I don't think that it is applicable here.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"PJ" wrote in message
...
Thanks Bob! It worked on most of the problems, but not all. It didn't
funciton correctly on the type of problem where the employee started in

the
evening and left work in the morning (night shift - 22:30 to 6:30). It

came
out as a string of pound signs. How can I fix this problem. I tried some

of
the ideans from the Excel BB area, but they didn't work either. Anything

you
can suggest would be better than what I have (or haven't) come up with.
Thanks tons.
PJ

"Bob Phillips" wrote:

What she should do is enter the start time in one cell, the end time in
another, and than have a simple subtraction in a third to calculate the

days
hours. Then just sum the days hours to get the weeks hours (and format

as
[h]:mm so as not to cycle through 24 hours).

Don't enter both in one cell, it is just too convoluted to extract

again.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"PJ" wrote in message
...
I'm doing a timesheet for my niece and am having a problem (I'm not

very
skilled at Excel - yet!). She needs to write down her entries in one

cell,
like 9:30am-5:30pm, or 8:00pm-4:00am, with a total at the bottom of

the
dcolumn showing that day's total hours worked by the various

employees.
How
do I go about it?






  #5   Report Post  
Posted to microsoft.public.excel.setup
PJ PJ is offline
external usenet poster
 
Posts: 112
Default How do I sum up a column hours, like 9:30am - 5:30pm, in Excel

I've been haunting other sites and found the two formulas you mentioned.
Neither worked, unfortunately, on both 6:30 to14:00 AND 22:30 to 6:30. I did
find the following forumla on another MS site and it worked just fine
=B1-A1+IF(A1B1,1). My NEW problem is that I want to now add up the
resulting columns of hours but Excel won't do it for me (probably because
there are formulas in those columns, and not 'real' numbers. Any more
advice? After sniffing around some of these sites, I realize what a real
beginner/dunce I am and I appreciate your help. Are all of you programers?

"Bob Phillips" wrote:

That is because when you subtract the end tine from the start time, you are
dealing with negative time (Excel stores time as a fraction of 1 day, so you
are subtracting 0.270833 from 0.9375, which is negative, and as time can't
be negative (at least in this universe), Excel objects as refuses to display
it.

There are two possible solutions:

- test if the start date is after the end date, =IF(A1B1,1-(A1-B1),B1-A1)

- use a more generic formula of =MOD(B1-A1,1)

You could actually switch to the 1904 date system
(ToolsOptionsCalculation1904 date system), which does allow negative
time, but you would still need a formula to transform the negative time
result, so I don't think that it is applicable here.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"PJ" wrote in message
...
Thanks Bob! It worked on most of the problems, but not all. It didn't
funciton correctly on the type of problem where the employee started in

the
evening and left work in the morning (night shift - 22:30 to 6:30). It

came
out as a string of pound signs. How can I fix this problem. I tried some

of
the ideans from the Excel BB area, but they didn't work either. Anything

you
can suggest would be better than what I have (or haven't) come up with.
Thanks tons.
PJ

"Bob Phillips" wrote:

What she should do is enter the start time in one cell, the end time in
another, and than have a simple subtraction in a third to calculate the

days
hours. Then just sum the days hours to get the weeks hours (and format

as
[h]:mm so as not to cycle through 24 hours).

Don't enter both in one cell, it is just too convoluted to extract

again.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"PJ" wrote in message
...
I'm doing a timesheet for my niece and am having a problem (I'm not

very
skilled at Excel - yet!). She needs to write down her entries in one
cell,
like 9:30am-5:30pm, or 8:00pm-4:00am, with a total at the bottom of

the
dcolumn showing that day's total hours worked by the various

employees.
How
do I go about it?








  #6   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 10,593
Default How do I sum up a column hours, like 9:30am - 5:30pm, in Excel

What do you mean by Excel won't do it? It might just be a format issue,
because it goes above 24 hours. Try formatting as [h]:mm. Otherwise post
back with more details.

BTW I can't speak for all, but I call myself an IT consultant, I see myself
as more than just a programmer <g.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"PJ" wrote in message
...
I've been haunting other sites and found the two formulas you mentioned.
Neither worked, unfortunately, on both 6:30 to14:00 AND 22:30 to 6:30. I

did
find the following forumla on another MS site and it worked just fine
=B1-A1+IF(A1B1,1). My NEW problem is that I want to now add up the
resulting columns of hours but Excel won't do it for me (probably because
there are formulas in those columns, and not 'real' numbers. Any more
advice? After sniffing around some of these sites, I realize what a real
beginner/dunce I am and I appreciate your help. Are all of you

programers?

"Bob Phillips" wrote:

That is because when you subtract the end tine from the start time, you

are
dealing with negative time (Excel stores time as a fraction of 1 day, so

you
are subtracting 0.270833 from 0.9375, which is negative, and as time

can't
be negative (at least in this universe), Excel objects as refuses to

display
it.

There are two possible solutions:

- test if the start date is after the end date,

=IF(A1B1,1-(A1-B1),B1-A1)

- use a more generic formula of =MOD(B1-A1,1)

You could actually switch to the 1904 date system
(ToolsOptionsCalculation1904 date system), which does allow negative
time, but you would still need a formula to transform the negative time
result, so I don't think that it is applicable here.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"PJ" wrote in message
...
Thanks Bob! It worked on most of the problems, but not all. It

didn't
funciton correctly on the type of problem where the employee started

in
the
evening and left work in the morning (night shift - 22:30 to 6:30).

It
came
out as a string of pound signs. How can I fix this problem. I tried

some
of
the ideans from the Excel BB area, but they didn't work either.

Anything
you
can suggest would be better than what I have (or haven't) come up

with.
Thanks tons.
PJ

"Bob Phillips" wrote:

What she should do is enter the start time in one cell, the end time

in
another, and than have a simple subtraction in a third to calculate

the
days
hours. Then just sum the days hours to get the weeks hours (and

format
as
[h]:mm so as not to cycle through 24 hours).

Don't enter both in one cell, it is just too convoluted to extract

again.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"PJ" wrote in message
...
I'm doing a timesheet for my niece and am having a problem (I'm

not
very
skilled at Excel - yet!). She needs to write down her entries in

one
cell,
like 9:30am-5:30pm, or 8:00pm-4:00am, with a total at the bottom

of
the
dcolumn showing that day's total hours worked by the various

employees.
How
do I go about it?








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
Stop excel from dropping the 0 in the beginning of a number? Rosewood Setting up and Configuration of Excel 12 April 4th 23 02:12 PM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM
Lookup Table Dilemma Karen Excel Worksheet Functions 2 June 10th 05 08:22 PM


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