In Google Spreadsheet, or excel if its the same, how do I find the last weekday of day D only if D is not a weekday itself.
I.E:
If D equals weekday = do
Another option may be:
=IF(WEEKDAY(D1, 2) > 5, D1 - (WEEKDAY(D1, 2) - 5), D1)