If you imagine you have any random date and want to look back in time to find the nearest Monday, you can see that you will need to "roll back" a specific number of days, depending on the day of week (e.g. Mon, Tue, etc) of the starting date. If the date is a Monday, you'll need to drop back 7 days, if the date is a Tuesday, you'll need to drop back 1 day, and so on. The table below shows the adjustment needed for each day of the week.
Days to drop back
The formula is based on the fact that Monday is 2 in Excel's default scheme, where weeks begin on Sunday. The "roll back" is calculated by getting the weekday value of the date 2 days before the given date, and subtracting this value from the date. So, assuming a date of June 4, 2015 (a Thursday) in cell A1, the formula is solved as follows:
This formula uses WEEKDAY to get an index for the day of week, and CHOOSE to fetch the correct roll back. One advantage of this approach is that CHOOSE allows arbitrary values for each day of the week. This is handy if you don't want to roll back if the date is already Monday. In that case, you can supply zero as the roll back number for when WEEKDAY returns 2 (Monday).
Monday previous to today
If you need to find the Monday previous to today, just use the TODAY function for date:
To check the weekday of a date, and roll back to Friday when the date is a Monday, you can use the IF and WEEKDAY functions. In the example shown, the formula in C5 is = IF ( WEEKDAY ( B5 ) = 2 , B5 - 3 , B5 ) How this formula works The WEEKDAY...
To return the next specific day of week (i.e. the next Wednesday, or Friday, or Monday) with a given start date, you can use a formula based on the WEEKDAY function. In the example shown, the formula in D6 is: = B6 + 7 - WEEKDAY ( B6 + 7 - 2 ) Where...
To get the last weekday in a month (i.e. the last Saturday, the last Friday, the last Monday, etc) you can use a formula based on the EOMONTH and WEEKDAY functions. In the example shown, the formula in D5 is: = EOMONTH ( B5 , 0 ) + 1 - WEEKDAY (...
To get the first day of the month for a given date, you can use a simple formula based on the DAY function. In the example shown, the formula in cell C5 is: = B5 - DAY ( B5 ) + 1 How this formula works The DAY function returns the day value for a...
The Excel WEEKDAY function takes a date and returns a number between 1-7 representing the day of week. By default, WEEKDAY returns 1 for Sunday and 7 for Saturday. You can use the WEEKDAY function inside other formulas to check the day of week...
Excel Formula Training
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.