In the example formula, B6 is the date 1/16/2015, and the formula in C6 is: The number 7 (the number argument in the MOD function) represents the day of week (dow) that you want. To solve this formula, Excel first subtracts the dow (7 in this case) from the date, then feeds the result into the MOD function as the number. MOD returns the remainder of dividing that number by 7, which is then subtracted from date. If you want to get the most recent day of week from the current date, you can use the TODAY function, like so: Note: If the the date has the same day of week, date will be returned.

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.