View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bill Kuunders Bill Kuunders is offline
external usenet poster
 
Posts: 303
Default Count Days Worked

Sounds like you have enough excel under your belt to do this with a few "if"
functions...........

My approach would be to add all the hours for each employee per day.
This could be done next to your existing list.
Add another 8 columns etc

When the employee name in column A is the same as the one above this line
add this day to the line above.

as an example j column will get all the day1 hours
function to use as a base......enter in j7..............=if(a6=a7,j6+b7,b7)

In this way you will get a cumulative list per employee
Then you would check in each subtotal line how many cells with 0 value and
subtract that from 7 , you'll need another if function here to determine
whether
you do have a subtotal line or not.

Have fun

Regards
Bill K




"Steph" wrote in message
...
Hi everyone. I have a data sheet that has a bunch of employees and the
time
they worked. I am trying to figure out how to count the number of days
each
employee worked in that week. The problem is that a given employee may
have
worked on different tasks, and therefore shows up on more than i line
(like
Emp1). The way I was doing it is on each row, I was doing a simple count
function. Then, on a different summary sheet, I used sumif to consolidate
the total hours worked. That works great for total hours worked, but # of
days worked return more than the actual # of days. So for Emp1, it
returned
14. How can I formulate that so it returns 6? Thank you!!!!

Day1 Day2 Day3 Day4 Day5 Day6 Day7 Total
Emp 1 5.00 3.50 3.00 2.00 2.00 15.50
Emp 1 3.00 2.00 2.25 7.25
Emp 1 3.00 3.00 1.00 7.00
Emp 1 3.00 3.50 2.00 8.50
Emp 2 8 8.00 8.00 8.00 8.00 40.00
Emp 3 7.00 7.00 7.00 21.00