Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
easdun
 
Posts: n/a
Default each time a name appears in a spreadsheet add a value

I am developing a staff roster and wish to know the number of hours
attributed to an indivdual for a week/month
  #2   Report Post  
Max
 
Posts: n/a
Default

Perhaps you might want to try something along these lines ..

Supposing you have a set-up in Sheet1 as per sample below, dates in col A,
names of staff on duty for the operating hours in cols B to F, all data from
row2 down:

_______ 8:00 9:00 10:00 11:00 12:00
01-Jun-05 Name1 Name1 Name1 Name2 Name2
02-Jun-05 Name2 Name2 Name1 Name1 Name1
03-Jun-05
04-Jun-05
etc

Then in Sheet2, if you have this set-up in A1:D2

StartDate EndDate Name1 Name2
01-Jun-05 02-Jun-05 ? ?

you could put in C2:

=SUMPRODUCT((Sheet1!$A$2:$A$100=$A2)*(Sheet1!$A$2 :$A$100<=$B2)*(Sheet1!$B$2
:$F$100=C$1))

and copy C2 across to D2

For the sample data in Sheet1, C2 and D2 will return 6 and 4, which would be
the number of hours that staff: Name1 and Name2 were on duty respectively
between the start and end dates entered in A2:B2, i.e. between 01-Jun-05 to
02-Jun-05 (inclusive)

So you could define the desired period (start / end dates in A2:B2), and
also extend the formula in C2 across to compute accordingly for all the
other staff names which you can list in C1 across.

Adapt the ranges in the formula to suit, but note that you can't use entire
column references (e.g.: A:A, B:B, etc) in SUMPRODUCT

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"easdun" wrote in message
...
I am developing a staff roster and wish to know the number of hours
attributed to an indivdual for a week/month



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
Adding time damezumari Excel Discussion (Misc queries) 2 June 20th 05 08:35 PM
time securityman Excel Discussion (Misc queries) 2 June 15th 05 11:44 AM
help with date and time wayne visser Excel Worksheet Functions 1 June 14th 05 04:10 PM
Spreadsheet/VBA Project Consulting: 50% Discount or Even Free - Limited Time Only Daniel CHEN Excel Worksheet Functions 3 June 1st 05 05:48 AM
time sheet Rusty Boy Excel Worksheet Functions 2 December 2nd 04 03:49 PM


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