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(...
mathetes
Oct 25, 2019Gold Contributor
It occurred to me that there's another function that is perfectly suited for your application. Try this formula: =CHOOSE(WEEKDAY(A5),2,2,3,4,5,6,6)
As the name of the function implies, this "chooses" what to put in the cell based on the value of A5, picking the one that is in the sequential order corresponding to the value of (in this case) WEEKDAY(A5).
Very useful function to know about whenever you have a simple set of alternatives that are easily ordered in sequence by integer numbers.
As the name of the function implies, this "chooses" what to put in the cell based on the value of A5, picking the one that is in the sequential order corresponding to the value of (in this case) WEEKDAY(A5).
Very useful function to know about whenever you have a simple set of alternatives that are easily ordered in sequence by integer numbers.