+ Reply to Thread
Results 1 to 10 of 10

Overlapping schedule conditional formatting issue

Hybrid View

fazalnajeeb Overlapping schedule... 06-28-2024, 09:28 AM
Glenn Kennedy Re: Overlapping schedule... 06-28-2024, 11:19 AM
fazalnajeeb Re: Overlapping schedule... 06-28-2024, 02:41 PM
JeteMc Re: Overlapping schedule... 06-29-2024, 07:14 PM
fazalnajeeb Re: Overlapping schedule... 06-30-2024, 12:30 PM
JeteMc Re: Overlapping schedule... 06-30-2024, 05:59 PM
fazalnajeeb Re: Overlapping schedule... 07-01-2024, 06:38 AM
JeteMc Re: Overlapping schedule... 07-01-2024, 10:32 PM
fazalnajeeb Re: Overlapping schedule... 07-02-2024, 07:28 AM
JeteMc Re: Overlapping schedule... 07-02-2024, 09:53 AM
  1. #1
    Registered User
    Join Date
    06-28-2024
    Location
    Germany
    MS-Off Ver
    2021
    Posts
    21

    Post Overlapping schedule conditional formatting issue

    Hi people,

    I am making a schedule for 8 measurement stations (file is attached for convenience). What I'm trying to do is to make sure that the time from each measurement station does not overlap. In order for that to work, I need the conditional formatting function. The applied range for conditional formatting would be the same as every other rule, I presume (=$Y$3:$BDH$12).

    The interesting columns are from E to X, which contains start time/date and end time/date (Gamry). If any of the 10 Gamry start time overlaps with eachother, I want those cells highlighted with red. I am not sure what else I can explain. Once you see the file, I am sure you will understand.

    Thank you! Best regards
    FNasync_tool_final_draft_FNa.xlsx
    Last edited by fazalnajeeb; 07-10-2024 at 05:56 AM. Reason: solved

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Overlapping schedule conditional formatting issue

    Some cells manually filled to show which cells should be highlighted when there is an overlap would hve helped.

    But...

    Maybe:

    =AND(D5<>"",D5<C5)

    applied to D5:X12. This highlights any start/end date that is EARLIER than any one to the left of it.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    06-28-2024
    Location
    Germany
    MS-Off Ver
    2021
    Posts
    21

    Re: Overlapping schedule conditional formatting issue

    Hi Glenn,

    Unfortunately, I could not convey exactly what was required. I added some assumed values and text boxes to give a better view.

    The highlights are required in the schedule area i.e. $Y$3:$BDH$12 like the other rules defined. The start/end date column turning red when there is an overlap is a plus; however not necessary.

    Thank you for taking the time out to answer. I apologize for the unclarity.

    Bests,
    Fazal

    sync_tool_final_draft_FNa_review.xlsx

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,855

    Re: Overlapping schedule conditional formatting issue

    Perhaps this will help.
    1. Populate Y5:BDH12 using:
    Formula: copy to clipboard
    =IF($A5<>"",IFERROR(AGGREGATE(15,6,(COLUMN($E5:$W5)-COLUMN($D5))/((ISNUMBER(SEARCH("end",$F$4:$X$4)))*($F5:$X5>Y$2+Y$3))/((ISNUMBER(SEARCH("start",$E$4:$W$4)))*($E5:$W5<Z$2+Z$3)),1),""),"")

    2. Populate Y18:BDH18 using (Note that you may move and or hide this row for aesthetic purposes):
    Formula: copy to clipboard
    =COUNT(Y5:Y12)

    3. Replace all dark blue formatting rules with: =AND(Y5<>"",Y5>=1) > font and fill dark blue
    4. Use the following as the red formatting rule: =AND(Y5<>"",Y5>=1,Y$18>1)
    Note that both rules are applied to the range Y5:BDH12
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    06-28-2024
    Location
    Germany
    MS-Off Ver
    2021
    Posts
    21

    Re: Overlapping schedule conditional formatting issue

    Hi JeteMc,

    Thank you for your message. I appreciate your help greatly. That seems to have done the job!

    On a side note, would you be able explain it because I don't fully understand the formula. I mean, I have a slight idea but it would be great to learn from you!

    Thanks again and Happy Sunday!

    Bests

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,855

    Re: Overlapping schedule conditional formatting issue

    IFERROR(AGGREGATE(15,6,(COLUMN($E5:$W5)-COLUMN($D5))/((ISNUMBER(SEARCH("end",$F$4:$X$4)))*($F5:$X5>Y$2+Y$3))/((ISNUMBER(SEARCH("start",$E$4:$W$4)))*($E5:$W5<Z$2+Z$3)),1),"")
    AGGREGATE(15,6,... 15 is the function number for SMALL and 6 is the option for ignore errors.
    (COLUMN($E5:$W5)-COLUMN($D5)) will produce an array from 1:19.
    ((ISNUMBER(SEARCH("end",$F$4:$X$4)))*($F5:$X5>Y$2+Y$3)) will produce an array of 1's and 0's where the column header contains the word "end" AND the date/times in columns F:X are greater than the date and time in rows 2:3 of the column containing the formula.
    ((ISNUMBER(SEARCH("start",$E$4:$W$4)))*($E5:$W5<Z$2+Z$3)) will produce an array of 1's and 0's where the column header contains the word "start" AND the date/times in columns E:W are less than the date and time in rows 2:3 of the column to the right of the one containing the formula.
    The division symbol, "/", is used so that the 0's will produce #DIV0! errors in the corresponding positions of the original array of 1:19 which will be ignored by the option, "6" and the 1's will leave the corresponding numbers in the original array unchanged.
    The ,1) near the right end of the formula will select only the smallest number that is left.
    The AGGREGATE formula is wrapped in IFERROR..."" so that if no numbers are left the cell displays a blank.
    I suggest selecting one of the dark blue or red cells and utilizing the Evaluate Formula feature to get a better idea of how the formula operates.
    Let us know if you have any questions.

  7. #7
    Registered User
    Join Date
    06-28-2024
    Location
    Germany
    MS-Off Ver
    2021
    Posts
    21

    Re: Overlapping schedule conditional formatting issue

    Thanks for the detailed explanation!

    I just have one more thing. All the conditional formatting rules (red, light blue, dark blue) have a common problem. Example, if the end time is 11:00, only until 10:30 will be highlighted.

    The requirement is that if for example, the starting and end time is from 07:50 to 11:40, the cells should be highlighted from 07:30 to 12:00. How can I fix that?

    Thanks.

    P.s: You can check it from the file uploaded by JeteMc: sync_tool_final_draft_FNa_review (fazalnajeeb).xlsx‎

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,855

    Re: Overlapping schedule conditional formatting issue

    The following light blue conditional formatting rule should do what you want for the :
    Formula: copy to clipboard
    =AND($A5<>"",$D5>Y$2+Y$3-30/1440,$C5<Z$2+Z$3)

    The following modification to the first formula in post #4 should what you want for the dark blue and red:
    Formula: copy to clipboard
    =IF($A5<>"",IFERROR(AGGREGATE(15,6,(COLUMN($E5:$W5)-COLUMN($D5))/((ISNUMBER(SEARCH("end",$F$4:$X$4)))*($F5:$X5>Y$2+Y$3-30/1440))/((ISNUMBER(SEARCH("start",$E$4:$W$4)))*($E5:$W5<Z$2+Z$3)),1),""),"")

    Let us know if you have any questions.

  9. #9
    Registered User
    Join Date
    06-28-2024
    Location
    Germany
    MS-Off Ver
    2021
    Posts
    21

    Re: Overlapping schedule conditional formatting issue

    All works perfectly now. I appreciate your help.

    Thank you so much!

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,855

    Re: Overlapping schedule conditional formatting issue

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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 Indicate On Schedule or Behind Schedule based on Times
    By Longbow 44 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-14-2023, 06:51 PM
  2. Overlapping conditional formatting
    By Sacruzsa in forum Excel General
    Replies: 1
    Last Post: 12-13-2022, 08:58 AM
  3. [SOLVED] Conditional Formatting with overlapping ranges
    By electricninja in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2017, 07:52 PM
  4. [SOLVED] Conditional Formatting - Overlapping Time
    By StartRunMSPaint in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-30-2014, 10:24 AM
  5. Overlapping bars with conditional formatting
    By MI_Analyst in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-23-2012, 04:52 AM
  6. overlapping conditional formatting
    By Xtopher in forum Excel General
    Replies: 8
    Last Post: 09-21-2011, 12:47 AM
  7. [SOLVED] vba overlapping conditional formatting
    By Susan J-P in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-11-2006, 01:10 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