+ Reply to Thread
Results 1 to 8 of 8

Counting the number of days per month where where a job start time was after 10:00

  1. #1
    Registered User
    Join Date
    05-07-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Counting the number of days per month where where a job start time was after 10:00

    I have and Excel spreadsheet that reports in column A the Date and column B the scheduled start time of each BOOKED classroom session throughout the day. The sessions have fixed start times i.e. 08:00, 10:15, 12:30, etc (each seesion is two hours with 15min gap). If asession was not BOOKED it does not appear in the spreadsheet

    I have been given the task of finding out how many days each month there were no sessions BOOKED before 10:00 and after 20:15.
    I could do this manually but what a pain... I am starting in Jan 2011.

    How best could I achieve the task using Excel to do the work?

    Thanks in advance for any help for any help
    Last edited by Apache_sim; 10-15-2013 at 05:28 AM. Reason: better description of what I would like to achieve

  2. #2
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Cameron, Mo
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Counting the number of days per month where where a job start time was after 10:00

    use a countifs statement with your 2 criteria count the number of days where you do have sessions booked then subtract from the number of days in the month.

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Counting the number of days per month where where a job start time was after 10:00

    Please attach a sample workbook with enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Note: Please don't attach documents containing confidential data like (address, telephone, ID#s, etc.).


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    05-07-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Counting the number of days per month where where a job start time was after 10:00

    What I am trying to achive is highlighted in yellow at the bottom of the data

    Session Bookings.xlsx

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Counting the number of days per month where where a job start time was after 10:00

    Try these formula’s

    =SUMPRODUCT(1/COUNTIF(A4:A105,A4:A105))-COUNTIF(B4:B105,TIME(20,30,0))

    And

    =SUMPRODUCT(1/COUNTIF(A4:A105,A4:A105))-COUNTIF(B4:B105,TIME(7,0,0))

  6. #6
    Registered User
    Join Date
    05-07-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Counting the number of days per month where where a job start time was after 10:00

    Sixthsense,
    That worked a treat thank you very much,
    Could you please explain what is happening in (1/COUNTIF(A4:A105,A4:105), I can see the remainder of the fomulae but not that element.

    Kind Regards
    M
    Last edited by Apache_sim; 10-15-2013 at 07:32 AM. Reason: spelling

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Counting the number of days per month where where a job start time was after 10:00


    A
    2
    1
    3
    1
    4
    2
    5
    2
    6
    5
    7
    5
    8
    5


    =SUMPRODUCT(1/COUNTIF(A2:A8,A2:A8))

    Appearance of 1 = 2 times
    Appearance of 2 = 2 times
    Appearance of 5 = 3 times

    So the countif will result COUNTIF(A2:A8,A2:A8)

    1 = 2;2
    2 = 2;2
    5 = 3;3;3

    Will be the result of countif 2;2;2;2;3;3;3

    So in the above the counif is getting the count of each values multiple times.

    When we divide it by 1 like this 1/COUNTIF(A2:A8,A2:A8) then EACH VALUES WILL BE DIVIDED BY ITS COUNT

    1 = 0.5 because it appears TWO to times (1/2)
    2 = 0.5 because it appears TWO to times (1/2)
    5 = 0.33 because it appears THREE to times (1/3)

    So the result will be like this.. 0.5;0.5;0.5.0.5;0.33;0.33;0.33

    The sum of the above will be 2.

  8. #8
    Registered User
    Join Date
    05-07-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Counting the number of days per month where where a job start time was after 10:00

    Sixthsense,
    Thank you for your explanation, and thank you for the solution.
    I appreciate the time people spend in assisting many like me on this forum.

    Regards
    M

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Number of days till.. Formula for counting number of days
    By Saturn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-21-2013, 05:46 AM
  2. Replies: 12
    Last Post: 02-08-2013, 02:26 PM
  3. Replies: 3
    Last Post: 11-12-2012, 04:03 PM
  4. Replies: 8
    Last Post: 03-29-2010, 09:20 PM
  5. How to start counting the hours in a month
    By kdraper in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-19-2007, 06:25 PM

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