Forum Discussion
RandomPanda1933
Mar 21, 2025Copper Contributor
Calculate "The Wednesday" two weeks before due date
We currently run checks on Wednesday of each week. To show an "anticipated pay date", I want to somehow use the "due date" of the invoice and return the date two Wednesday's prior. Is that even poss...
- Mar 21, 2025
The WEEKDAY function can be used for this. Its first argument must be a date value, of course. It returns a number from 1 to 7 indicating the day of the week. It also allows for a second argument (useful in this calculation) where you can specify which day of the week is assigned 1 (the default is Sunday).
So the formula can be:
=A2 - WEEKDAY(A2,14) - 7where A2 is a due date. See the attached workbook for more info and sample calculations.
SergeiBaklan
Mar 22, 2025Diamond Contributor
Just in case, that could be
=A2 - MOD( A2-5, 7 ) - 8