The result is TRUE for any date in the last complete 2 week period, where weeks begin on Monday. The TODAY function will return the current date on an ongoing basis, so this formula can be used create reports to show a rolling 4 weeks, rolling 6 weeks, etc. Excel dates are serial numbers, so they can be manipulated with simple math operations. The TODAY function always returns the current date. Inside the AND function, the first logical test checks to see if the date in B5 is greater than or equal to the Monday two weeks previous. This is based on a formula described here which gets the Monday of the current week. Once we have that date, we subtract 14 days to get the Monday two weeks prior. The second logical test simply checks if the date is less than Monday in the current week. when both results are TRUE, the AND function will return TRUE. If either result is FALSE, the AND function will return FALSE.
Last 6 weeks
The number of weeks is configurable by using an (n*7) value, where n is number of weeks. To test for the last 6 weeks, you can adjust the formula like this:
Include current week
To include the current week, you can use only the first logical test: Note: this will include future dates (if any) that appear in source data.
Dave Bruns
Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.