Wednesday, August 13, 2014

yogi_Starting With A Given Reference Date (or TODAY) Find Specified Number Of Weekdays (i.e. excluding Saturdays and Sundays)

                        Google Spreadsheet   Post  #1727
Yogi Anand, D.Eng, P.E.      ANAND Enterprises LLC -- Rochester Hills MI     www.energyefficientbuild.com.   Aug-13-2014
post by Mark6200:
(https://productforums.google.com/forum/#!category-topic/docs/spreadsheets/Lwctse0yDlk)
If function with weekday/workday and skipping weekend
I have the following setup but something is wrong with the following dates. I am trying to achieve that I see the next five working days in the fields but somehow it breaks on certain days, this is due to the fact that today + # of days is not bulletproof, it needs to determine again if today + # of days is not weekend. I am aware of this but am stuck on how to fix it.

B2 =IF(WEEKDAY( TODAY(), 2)>5 , WORKDAY( TODAY(), -1) , TODAY())
C2=IF(WEEKDAY( TODAY()+1, 2)>5 , WORKDAY( TODAY()+1, +1) , TODAY()+1)
D2=IF(WEEKDAY( TODAY()+2, 2)>5 , WORKDAY( TODAY()+2, +1) , TODAY()+2)
E2=IF(WEEKDAY( TODAY()+3, 2)>5 , WORKDAY( TODAY()+3, +1) , TODAY()+3)
F2=IF(WEEKDAY( TODAY()+4, 2)>5 , WORKDAY( TODAY()+4, +1) , TODAY()+4)

I hope someone can help me out with this
------------------------------------------------------------------------------------------------------------


No comments:

Post a Comment