+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting after 4 occurrences over 14 day period

  1. #1
    Registered User
    Join Date
    08-07-2013
    Location
    Monroeville, Pa
    MS-Off Ver
    Excel 2010
    Posts
    22

    Conditional formatting after 4 occurrences over 14 day period

    Good morning,

    I am tracking the number of COVID-19 cases at my workplace and I need to highlight all of the cases after five cases in a department over the past 14 days. My boss wants a visual cue so that we don't miss something when someone sorts the sheet differently than our standard sort.

    I have found a number of conditional formatting formulas to highlight after x number of occurrences, but nothing that includes a rolling 14 days.

    My columns are:
    - A: date of positive case
    - B: employee id
    - C: name
    - D: department

    Any help is greatly appreciated. Thank you in advance.
    Attached Files Attached Files
    Last edited by edp428; 11-25-2020 at 10:24 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Conditional formatting after 4 occurrences over 14 day period

    There are instructions at the top of the page explaining how to attach your sample workbook.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    08-07-2013
    Location
    Monroeville, Pa
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Conditional formatting after 4 occurrences over 14 day period

    Thank you, I posted a sample workbook as you suggested.

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Conditional formatting after 4 occurrences over 14 day period

    Not withstanding you have not said what you want formatting and the criteria. A cell could be at the beginning and the end of a 14 day period (or even the middle)

    =countifs(a:A,">"&a2-14,a:A,",="&a2)>3

    this will format the occurance red if there are 4 or more occurances in a rolling 14 day period

    if it is just the last 14 days
    =countifs(a:A,">"&today()-14,a:A,",="&today())>3


    mock up some shading as you would wish it to appear and we can give a better answer

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

    Re: Conditional formatting after 4 occurrences over 14 day period

    Try:

    =COUNTIF($A$2:A2,">="&A2-14)>4
    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. Conditional formatting for rolling date period
    By theonlyhamish in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-06-2020, 09:23 AM
  2. [SOLVED] Conditional Formatting: Highlight Occurrences between specified date range on a calendar
    By BayouRotor in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-06-2018, 03:08 PM
  3. [SOLVED] Conditional formatting "night and day" depending on time period
    By Duncan- in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 05-29-2018, 02:02 PM
  4. Conditional format to rank number of occurrences of alpha value
    By geobeck in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-21-2015, 11:48 AM
  5. [SOLVED] Extracting dates of group of occurrences over year period
    By Cygnet in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-14-2014, 07:06 AM
  6. conditional occurrences of specific string in a range
    By yogeshmaney in forum Excel General
    Replies: 3
    Last Post: 07-15-2012, 09:13 AM
  7. Count unique occurrences of dates within period
    By areynolds in forum Excel General
    Replies: 6
    Last Post: 10-26-2011, 01:31 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