+ Reply to Thread
Results 1 to 2 of 2

Conditional Formatting based on a date + 4, + 8, + 12, + 16, etc.

  1. #1
    Registered User
    Join Date
    05-22-2017
    Location
    Nashville, TN
    MS-Off Ver
    Professional Plus 2010
    Posts
    1

    Question Conditional Formatting based on a date + 4, + 8, + 12, + 16, etc.

    Basically what I am trying to do is create a way to manage patient scheduling based on several criteria.
    • Patients must be scheduled within 14 days on either side of a specific due date, hypothetically the date is in A1
    • Patients must be scheduled on a day when they would normally receive a home infusion (every 4 days)—so the appointment has to fall on a multiple of 4, based on the last known home infusion date (I’ll call that A2)

    I’d like to be able to put a dates into A1 and A2 and have the corresponding calendar conditionally formatted to highlight all the days when infusions would have happen (every 4 days going backwards from A2) and all the future possible infusion dates (every 4 days going forward from A2).

    It also has to highlight all the dates within 14 days (not weekends or holidays) of the date in A1 and then further identify the dates where both conditions are met.

    There are some other fancy things I’d ideally like to include** but the part that’s really stumping me is the conditional formatting for a date, A2+all dates that occur in 4 day increments (and the reverse). I’m not sure that makes sense, but I did manage it by creating a zillion formatting rules, basically: =$A$2+4, =$A$2+8, =$A$2+12,…,=$A$2+364 (each as its own rule)…. and then I went backwards through =$A$2-364. Technically it works, but it’s really clunky and not at all what I wish it was. I’ll live if there’s no way to make one rule that covers all the needed days, but I’ll be bummed.

    ** Other things I’ve figured out how to do, but probably didn’t do in the best way:
    - “questionnaires due” in A3 of example sheet needs to be visible only every 4th visit, starting at visit 17
    - Last Known Infusion Date and Visit Due Date should be formatted to stand out
    - Future visits (every 12 weeks) should appear, if they take place in that calendar year. I tried to go out through 2018 but Excel kept crashing so I dropped it
    - The number of home doses that need to be given to patient at visit (aka how many times will they take medicine, if they are supposed to take it every 4 days)

    I’ve been tearing my hair out over this and was close to just giving up and leaving it in all it’s un-elegant glory but I don't want to do that at all. Any suggestions at all would be appreciated (should also note that I have a decent grasp of conditional formatting but nothing to brag about. At all) In the attached file there are three versions, the first is how it stands now, the second is just a copy with the important rules removed, the third is stripped down so that my references to A1/A2/A3 made sense. Obviously in the first two, they don't match up.

    Thank you thank you thank you thank you thank you
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Conditional Formatting based on a date + 4, + 8, + 12, + 16, etc.

    You should be able to flag all dates that are in increments of 4 days +/- any starting date using a single CF rule and the MOD function.

    Highlight D5:J9 and apply this rule:
    =MOD($A$2-D5+1,4)=0
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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 based on date
    By ash2017 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-13-2017, 02:19 PM
  2. conditional formatting based on date
    By gocolonel77 in forum Excel General
    Replies: 2
    Last Post: 04-14-2014, 01:41 PM
  3. Conditional Formatting based on date
    By sans87 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 12-14-2013, 05:30 PM
  4. Replies: 3
    Last Post: 11-23-2013, 06:21 AM
  5. Help with conditional formatting based on date
    By dwilkinson12 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-07-2013, 08:49 PM
  6. Conditional Formatting based on Date
    By davidknowles in forum Excel General
    Replies: 2
    Last Post: 03-07-2012, 10:50 AM
  7. Conditional Formatting Based on Date
    By John F.M. in forum Excel General
    Replies: 1
    Last Post: 06-02-2005, 04:05 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