+ Reply to Thread
Results 1 to 3 of 3

Auto checking for shift pattern errors

  1. #1
    Registered User
    Join Date
    11-12-2017
    Location
    Stafford, England
    MS-Off Ver
    365
    Posts
    184

    Auto checking for shift pattern errors

    Hi,

    Sample attached is of rota system I use, employees must have 11 hours between shifts. Working til 8 at night and starting at 7 in the morning although 11 hours is not acceptable.

    Looking at the sample the following would cause an error
    C7 & F7
    C17 & F17
    H11 & K11
    M5 & P5
    R8 & U8


    Sheet 2 shows the result I would like to automatically display when an error occurs.
    Solution to be for just one day not all days, as this will be amended and copied to specific areas for each day on actual workbook.

    Thanks
    Tez
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Auto checking for shift pattern errors

    You could do it with conditional formatting

    Tuesday F5:I17
    =AND($F5<>"",$C5<>"",$F5+1-$C5<=11/24)
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    11-12-2017
    Location
    Stafford, England
    MS-Off Ver
    365
    Posts
    184

    Re: Auto checking for shift pattern errors

    That works great for highlighting cells on the same sheet and I will use this for the time being.

    OP may not have been clear, when saying
    "Sheet 2 shows the result I would like to automatically display when an error occurs."


    I was looking to generate a text string containing the number of errors on a separate sheet as I already have multiple worksheets and that's why I thought VBA may be needed.

    Thanks for the formula though.

+ 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 Pattern Adding Hours based on Shift etc
    By fgbuk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-01-2016, 07:56 PM
  2. [SOLVED] Shift Pattern Creator
    By dineshsachidananda in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-07-2016, 08:10 AM
  3. shift rotation pattern
    By ashintoms in forum Excel General
    Replies: 0
    Last Post: 04-22-2015, 05:06 AM
  4. shift pattern macros
    By gsw1991 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-30-2014, 10:36 AM
  5. Shift Pattern Thoughts
    By leet1970 in forum Excel General
    Replies: 1
    Last Post: 03-28-2014, 05:11 PM
  6. Shift Pattern Help
    By Slaine in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-15-2013, 05:09 AM
  7. Replies: 4
    Last Post: 02-06-2013, 04:21 AM

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