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 nothing (D equals D).
If D equals weekend = D equals last weekday.
Edit: i tried this to get the workday one month away:
WORKDAY(EDATE(N18, 1)+1, -1)
But I Was getting some weird results. Perhaps it counts red days as well, but I never specified the region anywhere.
Edit again:
This above example actually works, eg:
=WORKDAY("2013-04-06"+1, -1)
4
years now :) You should know better than to ask a question and expect someone to do the job for you. Sorry but I will have to vote this question to be closed. Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist – Siddharth Rout=WORKDAY(EDATE(N18, 1)+1, -1)
- can you give an example where you don't get the result you want....and what the required result should be in that case – barry houdini