+ Reply to Thread
Results 1 to 14 of 14

Roster: calculate the work days between 2 off days if it is more than 5 days.

  1. #1
    Registered User
    Join Date
    07-18-2020
    Location
    Singapore
    MS-Off Ver
    2019
    Posts
    6

    Roster: calculate the work days between 2 off days if it is more than 5 days.

    Hello, I am trying to make roster using excel. I need the formula that helps me calculate the work days between 2 off days if it is more than 5 days. Basically work day between off should not be more than 5. If it's more than 5 it will highlight to me. I tried few formulas but it did not work. Off days are labelled as OFF in roster. Any help will be welcomed.


    Please refer to attachment, thanks
    Attached Files Attached Files
    Last edited by VKang; 08-08-2020 at 12:47 PM. Reason: Attaching attachment

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2508 (Windows 11 Home 24H2 64-bit)
    Posts
    91,948

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new here, I have done it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-18-2020
    Location
    Singapore
    MS-Off Ver
    2019
    Posts
    6

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    Thanks Ali for the kind editing of the title. Since you are on it, if you have any solution to my problem it will be greatly appreciated.

    Thanks

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2508 (Windows 11 Home 24H2 64-bit)
    Posts
    91,948

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    If I did, I would have offered one.

    There are instructions at the top of the page explaining how to attach your sample workbook.

  5. #5
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    Please upload a sample workbook in accordance with the instructions in the yellow banner at the top of this window.

  6. #6
    Registered User
    Join Date
    07-18-2020
    Location
    Singapore
    MS-Off Ver
    2019
    Posts
    6

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    Thanks Geoff, as requested I have attached it. Thank you

  7. #7
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    Take a look at the yellow highlighting in rows 9 to 21.

    Is that close to what you want?

    All I an doing for each row is looking back 5 columns and highlighting the cell if there are no "OFF" entries in that range.

    The CF formula is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the attached update to your workbook.

    Let us know what you think.
    Attached Files Attached Files
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

  8. #8
    Registered User
    Join Date
    07-18-2020
    Location
    Singapore
    MS-Off Ver
    2019
    Posts
    6

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    Hey Geoff, that is exactly what I am looking at. Something to highlight to me when an individual is working more than 5 days. It will be amazing if it is not highlighting on the roster, instead besides the off column AG. It just needs to highlight on individual column name under AG column. Much appreciated

  9. #9
    Registered User
    Join Date
    07-18-2020
    Location
    Singapore
    MS-Off Ver
    2019
    Posts
    6

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    Alternatively my original idea was to count the gap between off days, if it is more than 5 it will highlight to me. That was my original idea but however I am unable to come up with the formula to work that around.

  10. #10
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    If you just highlight col-AG then that leaves you searching the entire month for the source of the "too many consecutive work days" problem. That's OK?

    I'm actually having a hard time finding a CF formula that just does a summary column - I'll keep trying. Meanwhile, if you could turn the current highlighting on or off would that help? If so, replace the CF formula with:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and set cell AI7 to "yes" or "no" to turn highlighting on or off.

    Re: your post #9, I don't understand - that's exactly what my current CF formula is doing. What am I missing?

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2508 (Windows 11 Home 24H2 64-bit)
    Posts
    91,948

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    You could use this as a CF rule if you want a flag in AG:

    =(MAX(FREQUENCY(COLUMN($E9:$AF9),($E9:$AF9="OFF")*COLUMN($E9:$AF9)))-1)>5

  12. #12
    Registered User
    Join Date
    07-18-2020
    Location
    Singapore
    MS-Off Ver
    2019
    Posts
    6

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    Thanks Geoff for your help. The formula given by Ali works exactly like planned, thank you Ali. Both of you have a good day and thank you again

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2508 (Windows 11 Home 24H2 64-bit)
    Posts
    91,948

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  14. #14
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Roster: calculate the work days between 2 off days if it is more than 5 days.

    @VKang Thanks for the feedback and added rep!

+ 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
    By JEGANKR in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-04-2017, 08:58 AM
  2. Roster Template - Rotating roster 14 week
    By ckfishe in forum Excel General
    Replies: 6
    Last Post: 04-19-2017, 06:26 AM
  3. Roster help please!
    By octopi in forum Excel General
    Replies: 2
    Last Post: 09-18-2010, 08:53 AM
  4. roster
    By Squallr in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-24-2010, 11:44 AM
  5. Roster
    By sprinter1801 in forum Excel General
    Replies: 11
    Last Post: 05-29-2010, 01:50 PM
  6. Roster
    By T-ball Coach in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-31-2006, 12:45 AM
  7. roster
    By Greg Brow in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-10-2005, 03:06 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