Excel/Totaling a number of people scheduled at certain times
Expert: Stuart Resnick - 11/2/2009
QuestionHello, I'm trying to figure out a way to have excel read start and end times in my agents shift to show how many are present at a certain time. For instance:
Agent schedules
Agent A - 8:00:00 AM - 6:00:00 PM
Agent B - 9:30:00 AM - 7:00:00 PM
Agent C - 10:00:00 AM - 8:00:00 PM
I want excel to show:
8:00 1
8:30 1
9:00 1
9:30 2
10:00 3
10:30 3
AnswerNew sheet, select cols A:D, Format, Cells, Number, Category: Time, Type: 1:30 PM, OK.
In A1:A3, enter:
8:00 AM
9:30 AM
10:00 AM
In B1:B3, enter:
6:00 PM
7:00 PM
8:00 PM
Range A1:B3 now shows the start/end times for the three agents.
In D1, enter:
8:00 AM
In D2, enter:
=D1+1/24/2
and copy down thru D2:D6.
In E1, enter:
=SUM(IF(D1>=$A$1:$A$3,IF(D1<=$B$1:$B$3,1,0)))
as an ARRAY (i.e., type the formula into cell, then instead of hitting the Enter key, hit Ctrl-Shift-Enter). Then copy down thru E1:E6.
Range D1:E6 now shows the results you want.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your
Excel question answered in this area then please ask an Excel question here