+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting: Highlight Occurrences between specified date range on a calendar

  1. #1
    Registered User
    Join Date
    08-05-2018
    Location
    Las Vegas, Nevada
    MS-Off Ver
    Office 2016
    Posts
    3

    Conditional Formatting: Highlight Occurrences between specified date range on a calendar

    Hello everyone,

    I am helping my wife build a worksheet that tracks her employees' absence and tardy occurrences. There are rules that assign points for different types of absences, and these points aggregate within the year to varying levels of discipline - then "roll off" after one year.

    She has asked to viewthe entries by both current year and "rolling year" (i.e., current month and previous 11 months). See attached calendar views.

    The conditional formatting formula works fine for the current year view. It is not working for the "rolling year" view.

    Here is the formula I am using: =COUNTIFS(EmployeeLeaveTracker,valSelEmployee,BeginLeaveDate,"<="&C6,EndLeaveDate,">="&C6,TypeOfLeave,'Leave Types'!$B$7)>0

    I'm sure the search method is affected by the way in which the "rolling year" dates are populated in the calendar view, but I can't seem to find a solution. Any ideas?

    Calendar View.png

    Rolling Year View.png

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Conditional Formatting: Highlight Occurrences between specified date range on a calend

    Without seeing the whole thing it would be too much guesswork to try and figure out what is not working and why.

    Please attach a copy of the file rather than screen captures, before doing so please replace any confidential information with fictional. Cartoon characters for employee names, that sort of thing. That way we can see exactly what you have to work with.

  3. #3
    Registered User
    Join Date
    08-05-2018
    Location
    Las Vegas, Nevada
    MS-Off Ver
    Office 2016
    Posts
    3

    Re: Conditional Formatting: Highlight Occurrences between specified date range on a calend

    File attached.

    The "Count of Occurrences" section works as required. It is the conditional formatting of the "rolling calendar view" section in which I have the issue. Both "Jane Doe" and "Mike Doe" have the correct data highlighted in the "calendar view." In the "rolling year" view, Jane populates nothing, whereas Mike has erroneous data.

    Thanks for the help.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Conditional Formatting: Highlight Occurrences between specified date range on a calend

    Only had a quick glance at it so far, first observation, the calendar doesn't appear to be populating correctly for rolling year (every month has 31 days).

    Looks like everything is defaulting to current month regardless of the month name in column B.

    I have a short formula that should fill the calendar correctly, will look it up later when I get home.

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Conditional Formatting: Highlight Occurrences between specified date range on a calend

    Have a look at this, see if it works as you need it to.

    I've changed the formulas in the calendar so that it now fills correctly, I don't think that the changes I've made have caused anything else to stop working.
    B6:B17 now contain dates formatted as month names, instead of just month names as text. Real dates are much easier to work with as you will see from the formulas filling the days in the rest of the calendar.

    One thing that I would suggest, which I haven't done, is to disable the 'Calendar Year Selection' in D3 if Rolling year is selected, or perhaps blank it out with conditional formatting. As rolling year is tied to the current date rather than the year selected, it could lead to confusion.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-05-2018
    Location
    Las Vegas, Nevada
    MS-Off Ver
    Office 2016
    Posts
    3

    Re: Conditional Formatting: Highlight Occurrences between specified date range on a calend

    You are awesome, thank you so much!

+ 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: 4
    Last Post: 07-25-2017, 03:56 PM
  2. Calendar Date Conditional Formatting Counts
    By AlexNorman100 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-22-2016, 09:20 AM
  3. Conditional formatting - highlight between date range
    By Kiwi129 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-04-2016, 08:32 PM
  4. How to use conditional formatting to highlight date
    By SSS86 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-13-2013, 03:47 PM
  5. Replies: 5
    Last Post: 08-22-2012, 05:06 PM
  6. Replies: 2
    Last Post: 02-21-2010, 05:53 PM
  7. highlight cells in a calendar with conditional formatting
    By eddie2424 in forum Excel General
    Replies: 5
    Last Post: 12-23-2009, 05:32 PM

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