+ Reply to Thread
Results 1 to 33 of 33

Conditional formatting of "Singular days off"

  1. #1
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13

    Post Conditional formatting of "Singular days off"

    Hi Friends,

    I am currently creating a roster; I have hit a problem where I have created a formatting formula that will highlight singular blank cells if both adjacent cells are non-blank. However, it has become tedious to enter the conditional formatting to every single cell individually. Is there a way to expedite my current process? a paste all function? or a better formula?

    In the example workbook you'll find my formulas in D7:Q7 of sheet "Roster"

    Thank you in advance for your help
    Shaz
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,918

    Re: Conditional formatting of "Singular days off"

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Conditional formatting of "Singular days off"

    As a conditional format?
    This highlights the cell before in the row ..
    Last edited by shazzab; 08-11-2024 at 08:53 AM.

  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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    I cannot open your workbook. It's complaining about it being protected. Please remove any workbook/worksheet protection and attach it again. Thanks.
    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.

  5. #5
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Conditional formatting of "Singular days off"

    There shouldn't be any protections; but i've re-uploaded. Hopefully that works.
    Thank you
    Attached Files Attached Files

  6. #6
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    No - "the file couldn't open in protected view".

    Can you save a copy from WITHIN the file and try uploading that?

  7. #7
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Conditional formatting of "Singular days off"

    This time copied from my office 365 account and not the computer drive
    Attached Files Attached Files

  8. #8
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    Same problem, but as I understand it, it's the same file!

    Did you do as I suggested? Open the file - save a copy to a different location - upload the copy.

  9. #9
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13
    Sure did. Im wondering if its work related accessibility. Ive sent a copy to my home email, download to my phone and reuploading use my person phone.... maybe thats the key
    Attached Files Attached Files
    Last edited by AliGW; 08-11-2024 at 09:49 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  10. #10
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    That has opened. I'll now have a look at the problem.

  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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    Right - that's an odd formula! Please explain EXACTLY what you think it is doing.

    =IF(ISNUMBER(MATCH(C7,INDIRECT("'Formula'!$K$24:$K$25"),0)),SUM(COUNTIF(D7:E7,INDIRECT("'Formula'!$I$24:$I$43")))>0,FALSE)

  12. #12
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Conditional formatting of "Singular days off"

    Sorry that formula is one that works; that one will highlight cells if within a 3 day window of a night shift (NN1 or S-NIGHT).

    The one I'm having trouble in is in the conditional formatting - this individual formatting of a cell will highlight the cell red if the previous and the next day have a shift in it. The aim is to highlight and "Island days off"
    =COUNTIFS(C7,Formula!A2:A14,E7,Formula!A2:A14,D7,"")

  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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    I don't see any such formatting rule anywhere in the worksheet ...

    But you could try this for cell C7:

    =AND(ISNUMBER(MATCH(B7,TOCOL(HSTACK(Formula!$K$24:$K$25,Formula!$I$24:$I$43),1),0)),C7="",ISNUMBER(MATCH(D7,TOCOL(HSTACK(Formula!$K$24:$K$25,Formula!$I$24:$I$43),1),0)))

    Applies to: =$C$7:$AD$70
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Conditional formatting of "Singular days off"

    Hmmm how frustrating that my conditional formulas did not even translate while uploading.
    So what I ended up doing was individually formatting each cell like this. D7 =COUNTIFS(C7,Formula!A2:A14,E7,Formula!A2:A14,D7,"") and then E7 =COUNTIFS(D7,Formula!A2:A14,F7,Formula!A2:A14,E7,""), so on and so forth.

    Thank you for your formula; Seems like it also does protonleah's does and highlights the previous cell regardless if it's blank or not.

    I'm wondering if there is no work around for what I need it to do
    Attachment 876657

  15. #15
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    Why not use this:

    =COUNTIFS(C7,Formula!$A$2:$A$14,E7,Formula!$A$2:$A$14,D7,"")

    for C7 and apply it to the whole range?

    But, I confess, I am not sure what you think it actually does. COUNTIFS does not return TRUE or FALSE, which is what you would want for conditional formatting.

    I'm not 100% sure what's supposed to happen as you haven't provided a manual mock-up - just failing formulae!

  16. #16
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    I don't see what is wrong with my formula:

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    7
    1
    DE8 DE8 DE8 DE8 DE8 DE8
    8
    9
    10
    11
    12
    13
    14
    DE8 DE8 DE8 DE8
    Sheet: Roster

    Maybe you didn't apply it correctly?
    Attached Files Attached Files

  17. #17
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Conditional formatting of "Singular days off"

    Try, =COUNTIFS(B$5:D$5,">="&$C$5,B7:D7,"<>")=3

  18. #18
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Conditional formatting of "Singular days off"

    Ahh; I see what's happened. So yours does work the way it needs to but for some reason, it does not apply the same when copied to Microsoft365. Looks like the same translation issue I had when my own formula did not work for you.

  19. #19
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    What do you mean? I am using 365. Custom formatting needs setting up in the desktop app, but will then work in the browser version (although you can't edit it there).

    Are you sure you're looking at the same file??? If the CF is correct on the desktop then it should be correct in the browser. I have NEVER known Excel lose formatting in this way.

  20. #20
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Conditional formatting of "Singular days off"

    Quote Originally Posted by josephteh View Post
    Try, =COUNTIFS(B$5:D$5,">="&$C$5,B7:D7,"<>")=3
    I'm sorry; this does nothing on my worksheet

  21. #21
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    Yes - it works fine in the browser as well, as I said.
    Attached Images Attached Images

  22. #22
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Conditional formatting of "Singular days off"

    Please attach your workbook showing it does nothing.

  23. #23
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13
    Quote Originally Posted by josephteh View Post
    Please attach your workbook showing it does nothing.
    Done thank you
    Attached Images Attached Images
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Conditional formatting of "Singular days off"

    Quote Originally Posted by AliGW View Post
    Yes - it works fine in the browser as well, as I said.
    Dang it; what am I doing wrong then

  25. #25
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    The latest attachment won't open - protected view message again.

  26. #26
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    Apply the rules in the desktop version and save. Then open that file in the browser. My formula works and updates just fine. I don't know what you are doing wrong, but I would not advise messing with CF formulae in the browser version.

    That said, I can't break it in the browser! I have no idea what you are doing wrong ...
    Last edited by AliGW; 08-11-2024 at 11:23 AM.

  27. #27
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13
    Quote Originally Posted by AliGW View Post
    Apply the rules in the desktop version and save. Then open that file in the browser. My formula works and updates just fine. I don't know what you are doing wrong, but I would not advise messing with CF formulae in the browser version.

    That said, I can't break it in the browser! I have no idea what you are doing wrong ...
    Oh okay, ill give that a go. Thank you for your help.
    Also i have no idea why its protecting the view this time around. Ive uploaded the exact same way i got it to work last time :O

  28. #28
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    Very odd - never had that with a workbook from anyone else here (and I open loads of them every day). Let us know how you get on.

  29. #29
    Registered User
    Join Date
    07-29-2024
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Conditional formatting of "Singular days off"

    No luck so far; and what's worse is that I've found another fail in my original formatting. I've found that the cells only highlight when DE8 is present on both of the adjacent cells. If another shift is selected the empty cell in between is no longer highlighted ... so back to square one for me.

    I will keep trying though.
    And again, thank you for your help

  30. #30
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    My formula should work with any shift.

  31. #31
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Conditional formatting of "Singular days off"

    Your workbook in post #23 couldn't be opened in protected view.

  32. #32
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,183

    Re: Conditional formatting of "Singular days off"

    Example of mine working with any shift.
    Attached Files Attached Files

  33. #33
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,641

    Re: Conditional formatting of "Singular days off"

    It works for me
    Hightlight C7:AD70, then use this CF formula:

    Please Login or Register  to view this content.
    Quang PT

+ 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. [SOLVED] Conditional formatting to show "Overdue" if date in adjacent cell is older than 5 days
    By Funkymonkey0073 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-13-2021, 09:48 PM
  2. Replies: 11
    Last Post: 06-05-2020, 02:08 AM
  3. Replies: 7
    Last Post: 10-21-2019, 03:34 PM
  4. Replies: 3
    Last Post: 07-22-2019, 02:28 AM
  5. Having trouble with formatting months and days as "MM" and "dd"
    By RyLH87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2013, 05:52 AM
  6. Replies: 2
    Last Post: 08-17-2012, 05:10 AM
  7. [SOLVED] excel should "paste special" a "conditional formatting"
    By lozturk21 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-23-2005, 10:05 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