SOLVED

Conditional Formatting for Date Occurring 2 Weeks (not days) in the Future

%3CLINGO-SUB%20id%3D%22lingo-sub-1189689%22%20slang%3D%22en-US%22%3EConditional%20Formatting%20for%20Date%20Occurring%202%20or%20more%20Weeks%20(not%20days)%20in%20the%20Future%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1189689%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20using%20Office%20365%20and%20I%20have%20a%20column%20of%20dates%20that%20are%20sorted%20in%20ascending%20order%20(recent%20date%20on%20top).%26nbsp%3B%20In%20Conditional%20Formatting%5CHighlight%20Cell%20Rules%5CA%20Date%20Occurring%20section%2C%20there%20are%20three%20provided%20options%20to%20format%20Weeks%3A%20%22Last%20week%22%2C%20%22This%20week%22%2C%20and%20%22Next%20week%22.%26nbsp%3B%20I've%20successfully%20utilized%20all%20three%20of%20those%20and%20applied%20a%20different%20fill%20color%20for%20each%20week.%20It's%20exactly%20what%20I%20need.%20I%20would%20also%20now%20like%20to%20do%20the%20same%20for%20weeks%20occurring%20after%20%22Next%20week%22.%20For%20example%2C%202%20weeks%20in%20the%20future%2C%203%20weeks%20in%20the%20future%2C%204%20weeks%20in%20the%20future.%20I've%20found%20lots%20of%20documentation%20that%20provides%20formulas%20for%20%23%20days%20in%20the%20future%2C%20but%20that%20doesn't%20do%20what%20I%20need%20because%20%23%20days%20in%20the%20future%20doesn't%20take%20into%20account%20the%20actual%20week.%20I%20need%20the%20formatting%20to%20recognize%20calendar%20weeks%20the%20same%20way%20that%20the%20provided%20options%20%22Last%20week%22%2C%20%22This%20week%22%2C%20and%20%22Next%20week%22%20do.%26nbsp%3B%20Is%20this%20possible%3F%20A%20Microsoft%20Support%20rep%20just%20told%20me%20via%20Chat%20Client%20it's%20not.%20I'm%20having%20a%20hard%20time%20believing%20that's%20true.%20Thanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1189689%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1189781%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20for%20Date%20Occurring%202%20Weeks%20(not%20days)%20in%20the%20Future%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1189781%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F566168%22%20target%3D%22_blank%22%3E%40SWB_MTC%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20were%20tackling%20this%20myself%2C%20I%20think%20I'd%20work%20out%20some%20%22helper%20cells%22%20or%20a%20%22helper%20table%22%20off%20in%20an%20obscure%20part%20of%20my%20workbook%2C%20where%20I'd%20first%20determine%20what%20range%20of%20dates%20falls%20in%20each%20of%20those%20weeks.%20One%20of%20those%20helper%20cells%20would%20be%20a%20simple%20%22Y%22%20for%20%222%20weeks%20out%22%20or%20%223%20weeks%20out%22%20etc.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20then%20refer%20to%20that%20cell%20(those%20cells)%20in%20the%20conditional%20formatting%20dialog%20box.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1189877%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20for%20Date%20Occurring%202%20Weeks%20(not%20days)%20in%20the%20Future%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1189877%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F566168%22%20target%3D%22_blank%22%3E%40SWB_MTC%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Econditional%20formatting%20rule%3A%3C%2FP%3E%3CP%3E%3DWEEKNUM(%24A2)%3DWEEKNUM(TODAY())%2BX%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EX%3Dnumber%20of%20weeks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1193304%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20for%20Date%20Occurring%202%20Weeks%20(not%20days)%20in%20the%20Future%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1193304%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F428790%22%20target%3D%22_blank%22%3E%40Patrick2788%3C%2FA%3EThanks%20much%20for%20this!%26nbsp%3B%20It%20*almost*%20works.%20I%20added%20the%20formula%20four%20times%20exactly%20as%20you%20typed%20it%2C%20substituting%201%20thru%204%20for%20X%20to%20shade%20the%20next%204%20weeks.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DWEEKNUM(%24A2)%3DWEEKNUM(TODAY())%2B1%3CBR%20%2F%3E%3DWEEKNUM(%24A2)%3DWEEKNUM(TODAY())%2B2%3CBR%20%2F%3E%3DWEEKNUM(%24A2)%3DWEEKNUM(TODAY())%2B3%3CBR%20%2F%3E%3DWEEKNUM(%24A2)%3DWEEKNUM(TODAY())%2B4%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20today%20is%2002-25-20%20(for%20those%20reading%20the%20post%20in%20the%20future).%20The%20new%20formulas%20shade%20in%20variants%20of%20gray%20that%20increase%20with%20each%20week%20for%20the%20next%201-4%20weeks.%20I've%20attached%20a%20picture%20of%20what%20the%20result%20is.%26nbsp%3B%20Sort%20of%20weird%20that%20the%20formula(s)%20see%20the%20same%20date%2C%2003-12-20%2C%20in%20two%20different%20weeks%3A%26nbsp%3B%20Week%202%20and%20Week%203.%26nbsp%3B%20Thanks%20again%20for%20your%20help.%26nbsp%3B%20I%20think%20your%20formula%20may%20be%20the%20answer%2C%20but%20something%20needs%20to%20be%20tweaked%3B%20I'm%20just%20not%20sure%20what.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIdeally%2C%20the%20dates%20would%20be%20shaded%20in%20variant%20shades%20of%20gray%20as%20follows%20(weekend%20days%20won't%20appear%20as%20they%20are%20not%20used%20in%20this%20application).%26nbsp%3B%20NOTE%3A%20Red%20is%20last%20week%20and%20Peach%20is%20this%20week%20(those%20were%20already%20done%20with%20the%20conditional%20formatting%20options%20provided%20by%20excel).%26nbsp%3B%3C%2FP%3E%3CP%3EWeek%201%3A%2003-02%20thru%2003-06%3C%2FP%3E%3CP%3EWeek%202%3A%2003-09%20thru%2003-13%3C%2FP%3E%3CP%3EWeek%203%3A%2003-16%20thru%2003-20%3C%2FP%3E%3CP%3EWeek%204%3A%2003-23%20thru%2003-27%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Week-Format.png%22%20style%3D%22width%3A%2095px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F173439i56542C9D57468A81%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Week-Format.png%22%20alt%3D%22Week-Format.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThanks%20again!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1193503%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20for%20Date%20Occurring%202%20Weeks%20(not%20days)%20in%20the%20Future%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1193503%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F566168%22%20target%3D%22_blank%22%3E%40SWB_MTC%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20works%20OK%20for%20me.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESee%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1193960%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20for%20Date%20Occurring%202%20Weeks%20(not%20days)%20in%20the%20Future%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1193960%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F428790%22%20target%3D%22_blank%22%3E%40Patrick2788%3C%2FA%3E%26nbsp%3B%20Thanks%20again!%26nbsp%3B%20So%20on%20a%20hunch%2C%20I%20checked%20out%20the%20order%20of%20my%20formulas.%26nbsp%3B%20I%20had%20added%20Week%204's%20formula%20*prior*%20to%20Week%203's%20formula%20which%20made%20Week%203%20the%20last%20in%20the%20list%20and%20forgot%20to%20reorder%20them%20in%20correct%20order%20(Week%201%2C%20Week%202%2C%20Week%203%2C%20Week%204).%26nbsp%3B%20After%20I%20reordered%20the%20formulas%2C%20it%20worked%20like%20a%20charm%2C%20so%20apparently%20the%20order%20makes%20a%20difference.%20Thank%20you%20so%20much!!!%20It%20makes%20me%20sad%20that%20when%20one%20contacts%20the%20sanctioned%20Microsoft%20Excel%20Support%20Experts%20for%20a%20paid%20account%20via%20the%20Chat%20Tool%2C%20you're%20told%20it%20can't%20be%20done.%20I%20*knew*%20it%20had%20to%20be%20possible%20as%20I%20couldn't%20have%20been%20the%20only%20person%20on%20the%20planet%20that%20needed%20to%20see%20dates%20in%20the%20future%20in%20relation%20to%20how%20many%20weeks%20out%20they%20are.%26nbsp%3B%20Much%20respect%20to%20you%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F428790%22%20target%3D%22_blank%22%3E%40Patrick2788%3C%2FA%3E!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1194183%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20for%20Date%20Occurring%202%20Weeks%20(not%20days)%20in%20the%20Future%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1194183%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F566168%22%20target%3D%22_blank%22%3E%40SWB_MTC%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMost%20things%20are%20possible%20in%20Excel%20with%20some%20creativity.%26nbsp%3B%20I'm%20surprised%20you%20were%20told%20no.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1194291%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20for%20Date%20Occurring%202%20Weeks%20(not%20days)%20in%20the%20Future%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1194291%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F428790%22%20target%3D%22_blank%22%3E%40Patrick2788%3C%2FA%3E%26nbsp%3B%20Right%3F!%3F%26nbsp%3B%20Me%20too!%26nbsp%3B%20Especially%20now%20that%20you%20provided%20me%20the%20function%20name%20and%20I%20Googled%20it.%26nbsp%3B%20There's%20info%20EVERYWHERE%20about%20it.%26nbsp%3B%20I%20don't%20think%20it%20was%20me%20because%20I%20was%20extremely%20specific%20about%20what%20I%20needed%2C%20basing%20my%20description%20on%20the%20current%20allowable%20options%20(Last%20Week%2C%20This%20Week%2C%20Next%20Week).%20Maybe%20it%20was%20a%20language%20barrier%20thing....%26nbsp%3B%20Can't%20thank%20you%20enough%20though...You%20rock!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1194409%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20for%20Date%20Occurring%202%20Weeks%20(not%20days)%20in%20the%20Future%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1194409%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3EThank%20you%20so%20much%20for%20your%20suggestion.%20I%20was%20able%20to%20do%20it%20with%20a%20single%20formula%20(see%20above).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2108722%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20for%20Date%20Occurring%202%20Weeks%20(not%20days)%20in%20the%20Future%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2108722%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F566168%22%20target%3D%22_blank%22%3E%40SWB_MTC%3C%2FA%3E%26nbsp%3BI%20tried%20your%20exact%20formula%2C%20and%20when%20I%20enter%20a%20date%20in%20a%20cell%2C%20the%20cell%20above%20it%20gets%20highlighted%2C%20not%20the%20cell%20I%20need.%20What%20is%20the%20cause%20of%20that%3F%3C%2FP%3E%3CP%3EDo%20I%20need%20to%20change%20%22A2%22%20to%20which%20column%20my%20cell%20is%20on%2C%20for%20example%20%22M%22%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I'm using Office 365 and I have a column of dates that are sorted in ascending order (recent date on top).  In Conditional Formatting\Highlight Cell Rules\A Date Occurring section, there are three provided options to format Weeks: "Last week", "This week", and "Next week".  I've successfully utilized all three of those and applied a different fill color for each week. It's exactly what I need. I would also now like to do the same for weeks occurring after "Next week". For example, 2 weeks in the future, 3 weeks in the future, 4 weeks in the future. I've found lots of documentation that provides formulas for # days in the future, but that doesn't do what I need because # days in the future doesn't take into account the actual week. I need the formatting to recognize calendar weeks the same way that the provided options "Last week", "This week", and "Next week" do.  Is this possible? A Microsoft Support rep just told me via Chat Client it's not. I'm having a hard time believing that's true. Thanks in advance.

11 Replies

@SWB_MTC 

 

If I were tackling this myself, I think I'd work out some "helper cells" or a "helper table" off in an obscure part of my workbook, where I'd first determine what range of dates falls in each of those weeks. One of those helper cells would be a simple "Y" for "2 weeks out" or "3 weeks out" etc.

 

And then refer to that cell (those cells) in the conditional formatting dialog box.

best response confirmed by SWB_MTC (Occasional Contributor)
Solution

@SWB_MTC 

conditional formatting rule:

=WEEKNUM($A2)=WEEKNUM(TODAY())+X

 

X=number of weeks

@Patrick2788Thanks much for this!  It *almost* works. I added the formula four times exactly as you typed it, substituting 1 thru 4 for X to shade the next 4 weeks. 

 

=WEEKNUM($A2)=WEEKNUM(TODAY())+1
=WEEKNUM($A2)=WEEKNUM(TODAY())+2
=WEEKNUM($A2)=WEEKNUM(TODAY())+3
=WEEKNUM($A2)=WEEKNUM(TODAY())+4

 

So today is 02-25-20 (for those reading the post in the future). The new formulas shade in variants of gray that increase with each week for the next 1-4 weeks. I've attached a picture of what the result is.  Sort of weird that the formula(s) see the same date, 03-12-20, in two different weeks:  Week 2 and Week 3.  Thanks again for your help.  I think your formula may be the answer, but something needs to be tweaked; I'm just not sure what.

 

Ideally, the dates would be shaded in variant shades of gray as follows (weekend days won't appear as they are not used in this application).  NOTE: Red is last week and Peach is this week (those were already done with the conditional formatting options provided by excel). 

Week 1: 03-02 thru 03-06

Week 2: 03-09 thru 03-13

Week 3: 03-16 thru 03-20

Week 4: 03-23 thru 03-27

 

Week-Format.png

Thanks again! 

@SWB_MTC 

It works OK for me.

 

See attached.

@Patrick2788  Thanks again!  So on a hunch, I checked out the order of my formulas.  I had added Week 4's formula *prior* to Week 3's formula which made Week 3 the last in the list and forgot to reorder them in correct order (Week 1, Week 2, Week 3, Week 4).  After I reordered the formulas, it worked like a charm, so apparently the order makes a difference. Thank you so much!!! It makes me sad that when one contacts the sanctioned Microsoft Excel Support Experts for a paid account via the Chat Tool, you're told it can't be done. I *knew* it had to be possible as I couldn't have been the only person on the planet that needed to see dates in the future in relation to how many weeks out they are.  Much respect to you @Patrick2788!

@SWB_MTC 

Most things are possible in Excel with some creativity.  I'm surprised you were told no.

@Patrick2788  Right?!?  Me too!  Especially now that you provided me the function name and I Googled it.  There's info EVERYWHERE about it.  I don't think it was me because I was extremely specific about what I needed, basing my description on the current allowable options (Last Week, This Week, Next Week). Maybe it was a language barrier thing....  Can't thank you enough though...You rock!

@mathetesThank you so much for your suggestion. I was able to do it with a single formula (see above).

@SWB_MTC I tried your exact formula, and when I enter a date in a cell, the cell above it gets highlighted, not the cell I need. What is the cause of that?

Do I need to change "A2" to which column my cell is on, for example "M"? 

@MSM182 

In conditional formatting rule formula for the reference you shall use first cell of the range to which the rule is applied.

@MSM182  Correct.  You have to use the Column letter for the specific column you're working in.   I've attached a copy of the original spreadsheet that @Patrick2788 was so kind to create for me and I added my own Column for you to see examples of Conditional Formatting with an Excel provided template date (like Today and Next Week) along with following weeks using the formula @Patrick2788 provided.  My column has Today, Next Week, and then Weeks 2-8 in the future.  I included a Color Legend because that's helpful to see at-a-glance.   NOTE: @Patrick2788 provided a cell range in his example for the "Applies to" area.  However, I used the entire Column (in my case "=$D:$D") in the "Applies to" area.  Another difference:  His formula references A2, which has a date entered. Conversely, my formula references D1, which is just text.  This proves that you don't necessarily have to have a Date entered in your reference cell.  It works both ways.