+ Reply to Thread
Results 1 to 9 of 9

Roster calculations - trying to count number of weeks worked

  1. #1
    Registered User
    Join Date
    12-10-2022
    Location
    Melbourne
    MS-Off Ver
    365
    Posts
    7

    Question Roster calculations - trying to count number of weeks worked

    Hi there,

    I have created a teaching roster for my staff and need to calculate the number of days and hours worked.

    My requirements are:
    1. Outlining the year's roster of teachers
    2. Calculating the number of classes taught for each teacher (sheet 2, columns C-K)
    3. Calculating the total hours taught (sheet 2, number of classes x total teaching hours - row 5)
    4. Number of hours taught in a specific time period "Unsociable hours" (Each hour after 8.00pm Weekdays and all day Saturdays is worth 1.25 hours)
    5. Total number of weeks taught

    I believe I have achieved points 1-4 but I would be open to feedback if there is a better way.

    For point 5, I'm not sure how to go about this. I'm wondering if there is a formula to count if a teacher appears once in a certain range. E.g. IF Teacher 1 appears in the range $F:$5:$K:$13, then count as 1 instance or one week worked.

    Any assistance would be much appreciated.

    Thank you.
    Attached Files Attached Files
    Last edited by jimjimminy; 01-08-2023 at 01:57 AM.

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Roster calculations - trying to count number of weeks worked

    For the number of weeks worked in January, please try in M6 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by HansDouwe; 01-07-2023 at 07:03 AM.

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Roster calculations - trying to count number of weeks worked

    In M6 copied down. For me array entry required but not for you.
    Please Login or Register  to view this content.
    When same copied to next month to cell M17 Month reference is to be changed. Change $A$1 to $A$12.
    Pl see file.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 01-07-2023 at 09:36 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Registered User
    Join Date
    12-10-2022
    Location
    Melbourne
    MS-Off Ver
    365
    Posts
    7

    Re: Roster calculations - trying to count number of weeks worked

    Thank you, both. I have used kvsrinivasamurthy's formula and just added:

    Please Login or Register  to view this content.
    So that I get the annual tally of weeks.

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Roster calculations - trying to count number of weeks worked

    Thanks for your feedback. Glad to have helped.

    Please consider adding reputation to all helpers, who you think they deserved because of the help provided.
    If you want to, please click *Add reputation at the bottom left of their answers.

    EDIT: Thanks for the rep .
    Last edited by HansDouwe; 01-07-2023 at 05:04 PM.

  6. #6
    Registered User
    Join Date
    12-10-2022
    Location
    Melbourne
    MS-Off Ver
    365
    Posts
    7

    Re: Roster calculations - trying to count number of weeks worked

    You're very welcome!

    I seem to have run into a little issue though. Just wondering if I have made an error somewhere?

    E.g. on sheet 2, I have filtered Teacher 3.
    M9 shows the correct number of weeks
    M20, though seems to be one week short and shows 8 weeks, instead of 9 (1 week short)
    M31 shows 10 weeks, instead of 12 (2 weeks short)

    I'm wondering if it's because I have set up the calendar in sheet 1 to show 5 weeks, whereas the formula is calculating for a 4-week period?

    Therefore, it is missing a week for each of those 5-week blocks.

    If you have any thoughts, that would be much appreciated.
    Thank you!
    Attached Files Attached Files

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Roster calculations - trying to count number of weeks worked

    My formula of Post #2 returns the correct values.
    See attachment.
    Attached Files Attached Files
    Last edited by HansDouwe; 01-07-2023 at 08:27 PM.

  8. #8
    Registered User
    Join Date
    12-10-2022
    Location
    Melbourne
    MS-Off Ver
    365
    Posts
    7

    Re: Roster calculations - trying to count number of weeks worked

    Amazing! Thank you so much HansDouwe!
    It works perfectly so far.
    I've just made a few adjustments so that it calculates the weeks worked in a period as well as counting the annual tally by adding the previous amount to your formula.
    I'll enter the rest of my roster data and will reply if I have any other issues. But I think this is solved now
    Attached Files Attached Files

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Roster calculations - trying to count number of weeks worked

    You are welcome.
    Thanks for the feedback and rep

    I thought this was a fun formula to make.

+ 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. Count 52 weeks back IF worker has worked
    By Sparda in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 11-05-2023, 04:17 PM
  2. [SOLVED] Unique count of number of weeks worked per month
    By alwizardus in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-08-2022, 03:17 AM
  3. Shift Roster - Total hours worked
    By lmyk46 in forum Excel General
    Replies: 3
    Last Post: 05-03-2022, 12:00 PM
  4. How many weeks worked over X-number of hours
    By EvanHailey in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2017, 08:19 PM
  5. [SOLVED] Need to COUNT the number of WEEKS
    By kldeal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-12-2016, 05:17 PM
  6. [SOLVED] Count number of holidays depending on number of weeks
    By ANTH16 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-11-2013, 03:42 AM
  7. Replies: 2
    Last Post: 08-29-2013, 04:30 AM

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