+ Reply to Thread
Results 1 to 10 of 10

Roster Days to Hours per Week?

  1. #1
    Registered User
    Join Date
    12-14-2018
    Location
    Staffordshire, England
    MS-Off Ver
    365
    Posts
    60

    Roster Days to Hours per Week?

    Hi All,

    I am currently working on a 2019 Roster for our warehouse department but have a problem in getting a formula to calculate back what days any agency workers are working into hours on a week by week basis if you follow. The roster naturally has a list of names in a column and then a column for each day of the month, 1, 2, 3 etc. Above this is each day of the week and then covering each week is the week number so for example Jan 1 to Jan 6 has week 1 in the row above as a merged cell. Then basically against each name / date is an indication of what shift they are working - be it D(day) or N(night).

    From this I need to create a seperate table listing each week number and then a formula that will look up the name from a seperate cell, match this with the first table and then look for each D or N in a given week (1,2,3 etc) and then sum these so I could end up with John Smith showing as working 4 night shifts in week 1 and 4 day shifts in week 2.


    The ultimate goal is for me then to convert that number 4 back into hours (so for example 4*12=48) which would show how many hours they are working each week.


    Many thanks for any input you can offer,

    Gazsim
    Attached Images Attached Images

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Roster Days to Hours per Week?

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. 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 shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    12-14-2018
    Location
    Staffordshire, England
    MS-Off Ver
    365
    Posts
    60

    Re: Roster Days to Hours per Week?

    Hi, I have attached a stripped down file which hopefully demonstrates what I can trying achieve. On the agency tab is where I would like to select the name in cell B7 which could then potentially return the correct number of shifts in the table from column V to AI on a week number basis.


    Many thanks,
    Gazsim
    Attached Files Attached Files

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Roster Days to Hours per Week?

    Please try at Agency

    H17

    =IFERROR(W17*12,"")

    W17

    =IFERROR(1/(1/COUNTIFS(INDEX(January!$E$9:$AI$88,MATCH($B$7,January!$B$9:$B$88,),),W$14,January!$E$8:$AI$8,">="&$F17,January!$E$8:$AI$8,"<="&$G17)),"")

    Copy across the tables.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-14-2018
    Location
    Staffordshire, England
    MS-Off Ver
    365
    Posts
    60

    Re: Roster Days to Hours per Week?

    Hi Bo,

    Many thanks for this, much appreciated.

    Just one further question - how can I account for weeks that cross two months?

    Thanks,
    Gazsim

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Roster Days to Hours per Week?

    Hi Gazsim,

    I will need to see your sheet, if data for each month is in separate sheet it gonna be hard.

  7. #7
    Registered User
    Join Date
    12-14-2018
    Location
    Staffordshire, England
    MS-Off Ver
    365
    Posts
    60

    Re: Roster Days to Hours per Week?

    Hi Bo, the sheets for the other months are exactly the same only for each individual month. I have tried to use the below simply to add up each COUNTIFS but the only trouble is it returns an error when there is no data contained on that sheet which there won't be until later in the year.

    =IFERROR(COUNTIFS(INDEX(January!$E$9:$AI$100,MATCH($B$7,January!$B$9:$B$100,),),Z$14,January!$E$8:$AI$8,">="&$F19,January!$E$8:$AI$8,"<="&$G19),"")+IFERROR(COUNTIFS(INDEX(February!$E$9:$AI$100,MATCH($B$7,February!$B$9:$B$100,),),Z$14,February!$E$8:$AI$8,">="&$F19,February!$E$8:$AI$8,"<="&$G19),"")


    Thanks!

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Roster Days to Hours per Week?

    Please try at W15

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I just duplicate Sheet Jan and rename to Feb. Weeknum still wrong, Merge cell is never be a good idea.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-14-2018
    Location
    Staffordshire, England
    MS-Off Ver
    365
    Posts
    60

    Re: Roster Days to Hours per Week?

    Brilliant! Perfect! What a formula though, I could have never have done that!!! :-)

    Thanks again,
    Gazsim

  10. #10
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Roster Days to Hours per Week?

    Happy to help

+ 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. Roster Template - Rotating roster 14 week
    By ckfishe in forum Excel General
    Replies: 6
    Last Post: 04-19-2017, 06:26 AM
  2. Formula which can calculate hours and days in a week
    By anniewalker in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 03-10-2016, 02:01 AM
  3. Replies: 2
    Last Post: 11-12-2014, 11:56 AM
  4. Split total hours in a week to individual days
    By abyblr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-15-2013, 09:17 AM
  5. Chart days of week x hours
    By cascao in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-12-2013, 04:47 AM
  6. Using days of the week to compute work hours
    By ronhc213 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2008, 06:46 PM
  7. [SOLVED] How do I calculate the week day hours between 2 days
    By Mickey in forum Excel General
    Replies: 1
    Last Post: 10-05-2005, 08:05 PM

Tags for this Thread

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