+ Reply to Thread
Results 1 to 12 of 12

Shift Rota - CF between two times, 24hr Shift Plan.

  1. #1
    Registered User
    Join Date
    05-02-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    15

    Unhappy Shift Rota - CF between two times, 24hr Shift Plan.

    Good Morning,

    I am creating a shift resource plan for my company, which would highlight the cells between two 24hr times as shown in the picture below.

    ResPlan.PNG

    The formula I am currently using is =IF(F1>=$C$4,IF(F2<=$D$4,1,0),0) , this formula currently changes the cell value to '1' if TRUE so my CF can turn the cell green.

    Although this only works for shifts that start after 06:00 and finish before 23:59, as you can see from the above picture we have late shifts and night shifts (22:30 - 07:00), currently my formula does not highlight the cells!

    Can anyone please please help?

    Thanks Mike
    Attached Images Attached Images

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

    Re: Shift Rota - CF between two times, 24hr Shift Plan.

    We can't work with images. Please attach a sample workbook. 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.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    05-02-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    15

    Re: Shift Rota - CF between two times, 24hr Shift Plan.

    Thanks AliGW,

    Please find attached a desensitized workbook, with a 'Before' and 'After' sheet as requested.
    Attached Files Attached Files

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

    Re: Shift Rota - CF between two times, 24hr Shift Plan.

    In F4 copied across and down:

    =IF(AND($D4>$C4,F$1>=$C4,F$2<=$D4),1,IF(AND($D4<$C4,F$1<=$D4,F$2<=$D4),1,IF(AND($D4<$C4,F$1>=$C4,F$2>=$C4),1,0)))

  5. #5
    Registered User
    Join Date
    05-02-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    15

    Re: Shift Rota - CF between two times, 24hr Shift Plan.

    OMG!! Amazing! Thank you so so much

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,409

    Re: Shift Rota - CF between two times, 24hr Shift Plan.

    No problem! Glad to have helped.

    You will notice that I changed your absolute and relative cell references so that you could drag across and down: you had used them the wrong way round.

  7. #7
    Registered User
    Join Date
    05-02-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    15

    Re: Shift Rota - CF between two times, 24hr Shift Plan.

    Ohh yea! haha , Thanks so much.

    I wonder if i could bother you again with another hopefully quick fix??

    Thanks Mike

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,409

    Re: Shift Rota - CF between two times, 24hr Shift Plan.

    I expect so ...

    What is it?

  9. #9
    Registered User
    Join Date
    05-02-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    15

    Re: Shift Rota - CF between two times, 24hr Shift Plan.

    I would like to CF the cells on the '2017' sheet, to highlight in RBG 186, 140, 220, if the two cells for that day are 22:30 and 07:00, I have included a 'before' and 'after' example on the attachment.

    Thanks in advance
    Attached Files Attached Files

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

    Re: Shift Rota - CF between two times, 24hr Shift Plan.

    This is a completely different query about conditional formatting. It's not a quick fix to the original solution, so please start a new thread with an appropriate title. Thanks!

    PS The original query was not really about conditional formatting at all, but an IF statement.

  11. #11
    Registered User
    Join Date
    05-02-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    15

    Re: Shift Rota - CF between two times, 24hr Shift Plan.

    no worries thank you so much for all your help.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,409

    Re: Shift Rota - CF between two times, 24hr Shift Plan.

    You're welcome!

+ 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. Shift Rota for work
    By crematesjay81 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-28-2015, 09:20 AM
  2. Shift rota help,
    By l3ights in forum Excel General
    Replies: 3
    Last Post: 05-23-2014, 08:31 AM
  3. Shift Rota/Calendar 5 crews Rotating Shift
    By Flynn Rider in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-07-2013, 08:03 AM
  4. Make-shift Work rota in Access
    By simon123 in forum Access Tables & Databases
    Replies: 2
    Last Post: 03-10-2011, 08:10 PM
  5. Shift Rota in Excel or Access
    By John in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-30-2006, 08:35 AM
  6. Staff rota, how can I make a letter represent a shift?
    By Mike Ellis in forum Excel General
    Replies: 3
    Last Post: 12-27-2005, 12:50 PM
  7. Rota's and Daily Shift Pattern's - Help !!!
    By Scott Cheesman in forum Excel General
    Replies: 3
    Last Post: 03-31-2005, 10:06 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