+ Reply to Thread
Results 1 to 13 of 13

How do I create a formula to count multiple events in a set time period ex 8 am to 10 pm

  1. #1
    Registered User
    Join Date
    12-06-2012
    Location
    New Braunfels Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    How do I create a formula to count multiple events in a set time period ex 8 am to 10 pm

    I can create a raw report from Cisco Unified CCX Historical Reports that has all calls to a group and I need to determine how may call were received during set time periods throughout the day 8 am to 10 am to 12 pm to 2 pm and so on I have tried numerous formulas with no luck it is possible my Wizard hat is not tall enough nor does it have enough stars to figure this out

    thanks in advance

    Bill

    I have included a spreadsheet TSCTIMEEXAMPLE.xlsx

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    Got the spreadsheet, where would you like the answer and how do you want it to look...a couple of hand coded examples of expected output would help immensely
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,227

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    Hi Wallardyce and welcome to the forum,

    Look at Column D for a new "Helper" column and the formula I think you need. Your times need a space between the last number and AM or PM. That is the first problem. Then converting the to time and rounding down to two hour shifts.
    See the big formula in D2. I've also done a Pivot Table and Chart so you can filter the group and see the times.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    12-06-2012
    Location
    New Braunfels Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    I went into the report generator and corrected the format for the date and time to add a space before am and pm
    I a running a report now that goes back one year
    I think what you came up with is going to work, I will let you know

    thanks gain

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,227

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    Hey -

    It's great to hear I might have a good answer every day or two. Hope it saves you time and makes you learn new stuff!

  6. #6
    Registered User
    Join Date
    12-06-2012
    Location
    New Braunfels Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    After changing the format of the date to add a space before am and pm your formula does not work
    what do I need to remove that does the compensation for the lack of a space?

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,227

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    I guess you have to show me what you have that doesn't work.

    Check to see there is a single space after the time and before the AM or PM. I guess I need to see what you have to understand the question now.

  8. #8
    Registered User
    Join Date
    12-06-2012
    Location
    New Braunfels Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    Here is what I am getting after formatting the report to add a space before am and pm
    Attached Files Attached Files

  9. #9
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    Why make thing complicated???

    =HOUR(TIMEVALUE(TRIM(MID(SUBSTITUTE(SUBSTITUTE(A1,"AM"," AM"),"PM"," PM"),11,25)))) - MOD(HOUR(TIMEVALUE(TRIM(MID(SUBSTITUTE(SUBSTITUTE(A1,"AM"," AM"),"PM"," PM"),11,25)))),2)


    It's very simple formula:

    =HOUR(A1)-MOD(HOUR(A1),2)
    Last edited by Teethless mama; 12-11-2012 at 10:34 PM.

  10. #10
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    from your descriptions, i gather that you are looking to find the total number of calls between 8 AM to 10 AM, and 12 PM to 2 PM.

    if that is the case, you can try to use this formula in the context of the file that you uploaded in post #8 above:

    Please Login or Register  to view this content.
    1007
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  11. #11
    Registered User
    Join Date
    12-06-2012
    Location
    New Braunfels Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    Does not seem like it worked
    Attached Files Attached Files

  12. #12
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,227

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    Hi wallardyce,

    I needed to put a space in front of the AM and PM to make the conversion to time work. The reason it didn't work for you the second time is that you ran the formula on cells that already had the space in front of the AM and PM. You said you got the data (without the space) from a text file import.

    Does this help your answer?

  13. #13
    Registered User
    Join Date
    12-06-2012
    Location
    New Braunfels Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How do I create a formula to count multiple events in a set time period ex 8 am to 10

    I changed how Crystal Report did the date and time format to include a space before am/pm so excel actually thinks it is date/time

    I have a years worth of data to crunch and was trying to determine what days/time of day had the most call activity

    Bill

+ 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