+ Reply to Thread
Results 1 to 14 of 14

Conditional Formatting For Staff Roster

  1. #1
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Conditional Formatting For Staff Roster

    Hi

    I am doing a staff shift roster.

    To minimise scheduling errors such as off day, I am trying to conditional format the cells/rows to remind me but to no avail.

    Please assist/advice.

    Attached a sample worksheet.

    Regards

    Nancy
    Attached Files Attached Files

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Conditional Formatting For Staff Roster

    Hi Nancy,

    You can update the conditional formatting formula as :-
    =AND(COUNTIF($B4:$D4,"N")=3,$E4<>"SD")

    See attached:- Staff Roster.xlsx

    Also I am not sure about your second conditional formatting logic which you have given in second callout ... Do you want both the conditional formatting logics to be merged ? Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Conditional Formatting For Staff Roster

    Hi

    Thanks for the assistance for the first condition.

    Yes. I want to have them "merged".

    That means a second condition. If that row does not have "DO" (that is off-day), I intend to have the font colour change to remind myself of the error.

    Thanks and regards

    Nancy

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Conditional Formatting For Staff Roster

    Hi Nancy,

    Below are the logics which you have shared, would suggest you to combine them. thanks

    If adjacent cell (B4:D4) has 3 consecutive "N", and E4=SD. OK
    If adjacent cell (B4:D4) has 3 consecutive "N", and E4≠SD, conditional format the whole row to font colour red

    If "DO" does not appear once in B6:H6, conditional format the whole row (A6:I6) to red

    If that row does not have "DO" (that is off-day), I intend to have the font colour change to remind myself of the error.
    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Conditional Formatting For Staff Roster

    Hi

    I tried with this formula but it can't work.

    =AND(COUNTIF($B4:$H4,"DO")=1) then conditional format to red for A4:I4.

    Please help.

    Thanks.

    Nancy

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Conditional Formatting For Staff Roster

    Hi Nancy,

    Please respond on my post#4. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  7. #7
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Conditional Formatting For Staff Roster

    Hi DILIPandey

    My apologies.

    Its ok with me to combine the conditional formatting as above.

    The first formula that you shared work fantastic. But I cannot get my 2nd condition (If "DO" does not appear once in B6:H6, conditional format the whole row (A6:I6) to red) formatted.

    Please help with the combined formula for conditional formatting.

    Regards

    Nancy

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Conditional Formatting For Staff Roster

    Hi Nancy,

    I am unable to get you..

    First conditional formatting logic is :-
    =AND(COUNTIF($B4:$D4,"N")=3,$E4<>"SD")

    Which means B4:D4 should contain N and E4 should not contain SD then Font Red

    now on row 6, you want that A6:I6 should have atleast one "DO", else whole row Red ?

    My questions are:-
    1) do you want this second condition to work only on row 6?
    2) if you want to merge then would it merge like :-

    If column B to Column D is having N AND column E do not have "SD" AND column A to I should have at least one "DO", make the entire row Red

    ?

    3) if yes, do you want font to be Red OR entire row to be in Red background ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  9. #9
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Conditional Formatting For Staff Roster

    Dear DILIPandey

    Sorry for the miscommunication.

    Both conditions I want to apply to all rows, ie row 4 to 9. That means if either of the 2 conditions are not met, I want the font colour to change to red.

    If any row does not contain at least 1 "DO" or "SD" adfter 3 consecutive "N", I prefer the font colour for that whole row to change to red.

    That means
    (a) If B4:H4 contains 1 "DO". Font colour no change
    (b) If B4:H4 do not have any "DO". Font colour for the whole row change to red.

    Regards

    Nancy

  10. #10
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Conditional Formatting For Staff Roster

    Thanks Nancy,

    I have applied the conditional formatting basis :-
    Below is REQUIRED, else entire row font would be Red:-

    SD should be there after three consecutive "N" in column B,C,D
    OR,
    "DO" should appear at least once in entire row

    see attachment:- Staff Roster.xlsx

    I have tested this and found it working fine...


    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  11. #11
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Conditional Formatting For Staff Roster

    Hi DILIPandey

    It works.

    Thanks.

    Nancy

  12. #12
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Conditional Formatting For Staff Roster

    You are welcome Nancy..

    Cheers

    Request you to mark this thread as [SOLVED].. thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  13. #13
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Conditional Formatting For Staff Roster

    Hi

    Apparently my roster does work.

    Please assist.

    Regards

    Nancy
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Conditional Formatting For Staff Roster

    Hi

    Apparently my roster doesn't work.

    Please assist.

    Regards

    Nancy

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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