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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

sum of timesheet



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 11:27 PM posted to microsoft.public.excel.misc
nidabland
external usenet poster
 
Posts: 8
Default sum of timesheet

Let's say A1: 9 am
A2: 12 pm
A3: 12:30 pm
A4: 3 pm
I need the total in A5 to calculate how many hours worked, but also if I
write "off" in A1:A4, I need A5 to say "off", so basically I need either the
total hours worked or the word "off" in A5. Is this possible? Thanks for
any help,
  #2  
Old May 27th, 2010, 11:47 PM posted to microsoft.public.excel.misc
Bob Phillips[_3_]
external usenet poster
 
Posts: 489
Default sum of timesheet

Try

=IF(COUNTIF(A1:A4,"off")=4,"off",SUM(A1:A4))

--

HTH

Bob

"nidabland" wrote in message
...
Let's say A1: 9 am
A2: 12 pm
A3: 12:30 pm
A4: 3 pm
I need the total in A5 to calculate how many hours worked, but also if I
write "off" in A1:A4, I need A5 to say "off", so basically I need either
the
total hours worked or the word "off" in A5. Is this possible? Thanks for
any help,



  #3  
Old May 28th, 2010, 03:07 AM posted to microsoft.public.excel.misc
Fred Smith[_4_]
external usenet poster
 
Posts: 2,386
Default sum of timesheet

Is "off" in *every* cell of a1:a4, or *any* cell?
If every, try:
=if(countif(a1:a4,"off")=4,"off",a2-a1+a4-a3)

If any, change =4 to =1

Regards,
Fred

"nidabland" wrote in message
...
Let's say A1: 9 am
A2: 12 pm
A3: 12:30 pm
A4: 3 pm
I need the total in A5 to calculate how many hours worked, but also if I
write "off" in A1:A4, I need A5 to say "off", so basically I need either
the
total hours worked or the word "off" in A5. Is this possible? Thanks for
any help,


 




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 09:36 PM.


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