Aug 23, 2021 01:37 PM
Trying to create a formula that adds x number of business days if priority is x.
This is what I have so far:
IF(Priority=“High”,WORKDAY({Writer Assignment Date},3,
IF(Priority=“Normal”,WORKDAY({Writer Assignment Date},5, IF(Priority=“Low”,WORKDAY({Writer Assignment Date},10))))))
It accepts this formula, but populates with an “#ERROR” in some fields and blank in others. All fields have the required selections.
Trying to create a due date field that is customized by priority. If it is high priority for instance, the person would need to complete the assignment within 3 business days by that date.
Solved! Go to Solution.
Aug 23, 2021 09:05 PM
Your closing parenthesis for the WORKDAY()
function is in the wrong place in the first two cases. It should close after the number, not at the end of the formula. What you’re doing is nesting the next IF()
function inside the WORKDAY()
function, which is causing those errors.
Reworking the formula to fix those, it should look like this:
IF(Priority="High", WORKDAY({Writer Assignment Date}, 3),
IF(Priority="Normal", WORKDAY({Writer Assignment Date}, 5), IF(Priority="Low", WORKDAY({Writer Assignment Date},10))))
However, this could be greatly simplified. All that you’re changing is the value passed to WORKDAY()
, and it’s all based on what is selected in {Priority}
. With that in mind, you could use the SWITCH()
function nested inside a single WORKDAY()
function.
WORKDAY(
{Writer Assignment Date},
SWITCH(
Priority,
"High", 3,
"Normal", 5,
"Low", 10
)
)
Aug 23, 2021 09:05 PM
Your closing parenthesis for the WORKDAY()
function is in the wrong place in the first two cases. It should close after the number, not at the end of the formula. What you’re doing is nesting the next IF()
function inside the WORKDAY()
function, which is causing those errors.
Reworking the formula to fix those, it should look like this:
IF(Priority="High", WORKDAY({Writer Assignment Date}, 3),
IF(Priority="Normal", WORKDAY({Writer Assignment Date}, 5), IF(Priority="Low", WORKDAY({Writer Assignment Date},10))))
However, this could be greatly simplified. All that you’re changing is the value passed to WORKDAY()
, and it’s all based on what is selected in {Priority}
. With that in mind, you could use the SWITCH()
function nested inside a single WORKDAY()
function.
WORKDAY(
{Writer Assignment Date},
SWITCH(
Priority,
"High", 3,
"Normal", 5,
"Low", 10
)
)
Aug 24, 2021 05:55 AM
This worked! Thank you