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.
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...
The Excel MOD function returns the remainder of two numbers after division. For example, MOD(10,3) = 1. The result of MOD carries the same sign as the divisor.
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.