Forum Discussion
wirebear
Oct 25, 2019Copper Contributor
Trying to get weekend dates that are typed in to round to nearest workday
Trying to get Saturday dates to round to Friday and Sunday Dates to round to Monday. I have formulas to do one or the other but can't figure out how to place both formulas for single cell. =IF(...
PeterBartholomew1
Oct 25, 2019Silver Contributor
Just for the hell of it, I defined a named formula 'adjustment' to refer to
= INDEX( {1,0,0,0,0,0,-1}, WEEKDAY(date) )
The worksheet formula for the adjusted date is then
= date + adjustment
If you prefer your weekdays to start on a Monday then the first formula becomes
= INDEX( {0,0,0,0,0,-1,1}, WEEKDAY(date, 2) )