Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Timesheet Counting problem

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Excel Timesheet Counting problem

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....
wrote in message
ps.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Excel Timesheet Counting problem

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.

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


" wrote:

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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel Timesheet Counting problem

Range("A1:A7").value <""

raises an error for me.


--
Regards,
Tom Ogilvy


"Corey" wrote in message
...
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....
wrote in message
ps.com...
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





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Excel Timesheet Counting problem

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.


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



wrote in message
ps.com...
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



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
Timesheet formula problem Leo Excel Worksheet Functions 3 January 7th 10 09:51 AM
timesheet problem TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 March 30th 09 08:30 PM
Somewhat complex timesheet problem. Don Excel Worksheet Functions 2 December 14th 06 05:05 PM
Timesheet problem Oi you Excel Discussion (Misc queries) 3 October 18th 05 09:01 PM
Timesheet Problem GregR Excel Discussion (Misc queries) 4 December 6th 04 07:04 PM


All times are GMT +1. The time now is 05:28 PM.

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

About Us

"It's about Microsoft Excel"