+ Reply to Thread
Results 1 to 9 of 9

CF to color RED certain time plus specific name

  1. #1
    Registered User
    Join Date
    06-06-2022
    Location
    USA
    MS-Off Ver
    2007
    Posts
    62

    CF to color RED certain time plus specific name

    =SUM((MOD($A$1-$A2:$A99,1)>MOD($B$1-$A2:$A99,1))+(MOD($B2:$B99-$A2:$A99,1)>MOD($B2:$B99-$A$1,1))+($A$1=$A2:$A99)+($B$1=$B2:$B99))

    =(MOD($A$1-$A2,1)>MOD($B$1-$A2,1))+(MOD($B2-$A2,1)>MOD($B2-$A$1,1))+($A$1=$A2)+($B$1=$B2)

    I got these two formulas from HansDouwe, thanks, however for another worksheet
    just need a little adjustment or addition, sorry for posting again but I tagged that last post
    as SOLVED prematurely. Last referred post was today at 2:08 pm. and here is a sample attached
    of my worksheet which will only need to add the name in G as a criterion for the formula in Conditional Formatting.
    Attached Files Attached Files

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: CF to color RED certain time plus specific name

    Hi Frank,
    In the previous tread there were no names involved.

    In the sheet I don't see that the CF rules are implemented. Otherwise James M's times in row 6 (10:30 - 12:35 overlaps 10:20 - 11:20) would also have been red.
    Would that (red) have been correct in the new situation?

    Do I understand you correctly when you want to add the name as an extra criterion?
    And what about the overlap of the periods?
    If the name is the same, is there no longer any need to pay attention to overlap in the periods?
    After all, the times of John D in row 2 and 9 do not overlap with the times of John D in the first row.
    Last edited by HansDouwe; 09-26-2022 at 06:00 PM.

  3. #3
    Registered User
    Join Date
    06-06-2022
    Location
    USA
    MS-Off Ver
    2007
    Posts
    62

    Re: CF to color RED certain time plus specific name

    Correct, this is another example, same and different worksheet as I added the names, sorry I did not do CF, but I colored it manually.
    Basically, using the same 2 formulas you gave me I wanted to be true if the name repeats too.
    So, if I have John Doe on top and his name repeats and also it is between the time on the first line with his name that's when I'd like the red.
    In other words, RED will be if there is a time between 10:20 and 11:20 and only if John Doe is in G (it could be another name but as long as it is in G1 that's the one.

  4. #4
    Registered User
    Join Date
    06-06-2022
    Location
    USA
    MS-Off Ver
    2007
    Posts
    62

    Re: CF to color RED certain time plus specific name

    Do I understand you correctly when you want to add the name as an extra criterion?
    Yes.

  5. #5
    Registered User
    Join Date
    06-06-2022
    Location
    USA
    MS-Off Ver
    2007
    Posts
    62

    Re: CF to color RED certain time plus specific name

    "After all, the times of John D in rows 2 and 9 do not overlap with the times of John D in the first row."
    A: Correct that's why 2 and 9 need to stay black, however see that 10 is RED because overlaps and also has John Doe both criteria are met.
    Remember since I do not have the formula those colors are manually done for visual explanation.

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: CF to color RED certain time plus specific name

    Thx for the clarification.
    Please see attachment for the results:
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-06-2022
    Location
    USA
    MS-Off Ver
    2007
    Posts
    62

    Re: CF to color RED certain time plus specific name

    The file is exactly what I want, amazingly done. Congratulations and thanks.
    What I now having issues is applying the formulas to the cells since I have G, L, M cells
    and with CF is hard to see the entire formula and which cells carry them.
    I'm a rookie remember. I did it with the first post even though it took me a while but
    it will help me more, if it is not too much to ask to tell me what you did like:
    which formula you put in which cells, using your own workbook just a brief description please.
    It may be easy for you guys but I'm not getting it in my worksheet, been trying hard.
    Something like this as you wrote in the first post if it is not too much to ask, please:

    <<<<<<Please try this CF-rule applies to $A$2:$B$99:
    Formula: Select Code copy to clipboard
    =(MOD($A$1-$A2,1)>MOD($B$1-$A2,1))+(MOD($B2-$A2,1)>MOD($B2-$A$1,1))+($A$1=$A2)+($B$1=$B2)
    Please try this CF-rule applies to $A$1:$B$1
    Formula: Select Code copy to clipboard
    =SUM((MOD($A$1-$A2:$A99,1)>MOD($B$1-$A2:$A99,1))+(MOD($B2:$B99-$A2:$A99,1)>MOD($B2:$B99-$A$1,1))+($A$1=$A2:$A99)+($B$1=$B2:$B99))>>>

  8. #8
    Registered User
    Join Date
    06-06-2022
    Location
    USA
    MS-Off Ver
    2007
    Posts
    62

    Re: CF to color RED certain time plus specific name

    I got it, finally, thank you much, no need to reply anymore.

  9. #9
    Registered User
    Join Date
    06-06-2022
    Location
    USA
    MS-Off Ver
    2007
    Posts
    62

    Re: CF to color RED certain time plus specific name

    Unfairly does not give me the chance to give you another reputation that you deserve.
    Well, I appreciate your time and effort.
    Thanks.

+ 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. Replies: 2
    Last Post: 02-12-2020, 12:54 PM
  2. [SOLVED] Overwrite the conditional color format to change color in specific cell
    By Jimmy1709 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2019, 09:34 AM
  3. how to find a color in a row where the color is blue , if true fill with a specific text
    By jayakumar.chandran in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2012, 03:38 AM
  4. Color Header Specific Color Only to End of Text
    By MSmithson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-29-2010, 08:27 PM
  5. Replies: 3
    Last Post: 07-08-2010, 06:48 PM
  6. Form a circle (ie. color specific cells) given specific radius
    By David in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-11-2006, 11:00 AM
  7. [SOLVED] Form a circle (ie. color specific cells) given specific radius
    By David in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-03-2006, 11:50 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