Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Excel Timesheet Counting problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
patrickboozer@gmail.com - 21 Jan 2007 02:02 GMT
I have an excel timesheet that I want to do a simple task - count if an
employee ever works 7 days in a row.

Any Ideas?

Thanks,

Patrick
Corey - 21 Jan 2007 02:28 GMT
Depends on how you have each day set up.
If you have a daily cell value with hours in it you could use something
like:

If Range("A1:A7").value <>"" then msgbox "The Employee has worked 7 days
straight."
' Where A1:A7 is the hrs worked for each day.

Corey....
>I have an excel timesheet that I want to do a simple task - count if an
> employee ever works 7 days in a row.
[quoted text clipped - 4 lines]
>
> Patrick
Tom Ogilvy - 21 Jan 2007 03:54 GMT
Range("A1:A7").value <>""

raises an error for me.

Signature

Regards,
Tom Ogilvy

> Depends on how you have each day set up.
> If you have a daily cell value with hours in it you could use something
[quoted text clipped - 13 lines]
>>
>> Patrick
Martin Fishlock - 21 Jan 2007 02:35 GMT
Patrick

This checks for series of 7 dates in a column:

=(2*MIN(B1:B7)+6)/2*7=SUM(B1:B7)

As in:
Row\Col       A (Date)     B (Ans)
1     25/1/2007    TRUE
2     26/1/2007    FALSE
3     27/1/2007    FALSE
4     28/1/2007    FALSE
5     29/1/2007    FALSE
6     30/1/2007    FALSE
7     31/1/2007    FALSE
8                FALSE
9     2/2/2007    TRUE
10    3/2/2007    FALSE
11    4/2/2007   
12    5/2/2007   
13    6/2/2007   
14    7/2/2007   
15    8/2/2007   

You can then just do a
=if(countif(B:B,TRUE)>0,"Worked more than 6 days in a row","")

Otherwise do the same in VBA.

Signature

Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.

> I have an excel timesheet that I want to do a simple task - count if an
> employee ever works 7 days in a row.
[quoted text clipped - 4 lines]
>
> Patrick
Chip Pearson - 21 Jan 2007 11:48 GMT
There are a number of ways to do this. How is your data laid out? How many
columns wide is the data? What does the data in each column mean? Are
non-worked days blanks or do they have a 0?

There are many way to lay out a timesheet, and a solution that applied to
one format may not work in another. You need to supply much more
information. Details count.

Signature

Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

>I have an excel timesheet that I want to do a simple task - count if an
> employee ever works 7 days in a row.
[quoted text clipped - 4 lines]
>
> Patrick
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.