+ Reply to Thread
Results 1 to 6 of 6

Formula for Time frames

  1. #1
    Registered User
    Join Date
    07-28-2009
    Location
    Chicago, Il
    MS-Off Ver
    Excel 2007
    Posts
    67

    Formula for Time frames

    Good morning,
    I have a spreadsheet in which i need to find a formula that will pull over time frames and count how many are in this time frame.
    I have one sheet (Staffline) that has time intervals at 15 minutes starting with 8:00am then 8:15am etc this is in the first row going to 8:00pm
    then on another sheet (Schedules) I have agents that are listed vertically with the names in column A then the times they work in Column B - now the times that they work are listed as IE: 8:00 AM-4:30 PM

    what i need to do is have the (Staffline) sheet lookup the (Schedules) sheet and lets say the row says 8:00am i want to count how many are included in the 8:00am Schedules. So if the agent has the schedule 8:00 AM-4:30 PM this would count as 1 agent across row B as 1 from column a to column AI

    I have attached the worksheet for review
    Attached Files Attached Files
    Last edited by NBVC; 01-18-2011 at 03:20 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula for Time frames

    I am not sure I completely understand.

    Are we only looking at Row 1 in Staffline? And comparing those times to the time ranges in the other sheets? What about the times in Column A of Staffline? Do they have anything to do with this request?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-28-2009
    Location
    Chicago, Il
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Formula for Time frames

    Sorry about that. The Column A on Staffline is to show start times of the agents. so the counts would start on Column B. so with the examples in the spreadsheet I would have 3 agents in row 2 in all the cells from column B to AJ
    Like this. if this helps Sorry its a little difficult to explain so figure i would copy and paste so you can see what result i am trying to get. It may not be possible

    shifts 8am 815am 830am 845am
    8am 3 3 3 3
    830am 2 2

    sorry its not showing up right but how it should look is 3's under 8am, 815am, 830am and 845am
    then 2's under 830am and 845am. this would all be pulled from the schedules tab. i am looking for it to count how many agents i have starting at 8am, 830am etc.
    but it should only count it if it calls in the time on Row 1
    Last edited by Ricardo9211; 01-18-2011 at 01:35 PM.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula for Time frames

    Try in B2:

    =COUNTIFS(Schedules!$B:$B,$A2,Schedules!$B:$B,"<="&B$1,Schedules!$C:$C,">="&B$1)

    copied down and across the whole matrix.

    To hide the zeros, you can format the cells as Custom: 0;-0;;@

  5. #5
    Registered User
    Join Date
    07-28-2009
    Location
    Chicago, Il
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Formula for Time frames

    That worked wonderfully. by chance would you be able to point me in the direction of where i would be able to learn how this actually works. Still a Newbie and want to not only have the formula but know what is driving it

    Thanks again for all your help

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula for Time frames

    Try here:

    http://office.microsoft.com/en-us/ex...010047494.aspx

    and if you google COUNTIF or COUNTIFS you should get some more useful links.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1