Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2007 - Time Schedule Question

Status
Not open for further replies.

MiagiSan

IS-IT--Management
Aug 1, 2005
51
CA
Hi Everyone,

I have a staff schedule presented to me in Excel. (I am using 2007)

A 1,2 Merged (Person1)
A 3,4 Merged (Person2)

B1 - 9:00AM (Start of shift for person 1)
B2 - 5:00PM (End of Shift for person 1)
B3 - 10:00AM (Start of Shift for person 2)
B4 - 6:00PM (End of Shift for person 2)

I am not sure if this is possible but I would like to be able to easily show how many people are available for each hour of the day.

Using the data from above, the below output should show like so.

People Available by Hour
12:00 AM - 0
1:00 AM - 0
2:00 AM - 0
3:00 AM - 0
4:00 AM - 0
5:00 AM - 0
6:00 AM - 0
7:00 AM - 0
8:00 AM - 0
9:00 AM - 1
10:00 AM - 2
11:00 AM - 2
12:00 PM - 2
1:00 PM - 2
2:00 PM - 2
3:00 PM - 2
4:00 PM - 2
5:00 PM - 1
6:00 PM - 0
7:00 PM - 0
8:00 PM - 0
9:00 PM - 0
10:00 PM - 0
11:00 PM - 0


I have tried an IF statement however it would not allow me to add more than one argument to the formula. Does anyone know if this is possible?

I appreciate your help!


 



hi,

1. DO NOT use merged cells. You will be shooring yourself in the foot. Put the NAME on each row that relates to that person. Use Conditional Formatting to "hide" the font color if necessary.

2. change your FIRST table to this structure...
[tt]
Person In Out
a 9:00 13:00
b 10:00 14:00
[/tt]
Name your range in accordance with the table headings.

Use this formula...
[tt]
=SUMPRODUCT(--(In<=A2)*(Out>A2))
[/tt]
where A2 is your first date. copy down


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 


This might be better...
[tt]
B2: =SUMPRODUCT(--(In<=A2)*(Out>=A2))
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top