Apr 03, 2021 07:36 AM
Hi,
I’m trying to get familiar with the SWITCH formula by taking a shot at using it instead of a nested IF but can’t seem to figure out the following.
I have a field called “Expiry Date” (type Date) and another field called “Expired?”, which is a formula field where I’m trying to use the SWITCH formula. My goal is that the “Expired?” field formula should output “Expired” if the “Expiry Date” is lesser than TODAY(); it should output “Expires today” if the “Expiry Date” equal to TODAY(); and should output “Still Active” if the "Expiry Date is greater than TODAY().
The formula I’m using is
SWITCH({Expiry Date},<TODAY(),"Expired",=TODAY(),"Expires Today", >TODAY()"Still Active","N/A")
I’m definitely doing something wrong because I’m getting a formula error.
Can somebody please help me with this.
Thanks,
Sean
Solved! Go to Solution.
Apr 03, 2021 07:46 AM
You’ll need to use a nested IF formula, because that’s not how the SWITCH function works. The SWITCH function only allows one expression, and then you list a static set of results to choose from.
Apr 03, 2021 07:46 AM
You’ll need to use a nested IF formula, because that’s not how the SWITCH function works. The SWITCH function only allows one expression, and then you list a static set of results to choose from.
Apr 03, 2021 08:26 AM
Ah, got it. Thanks, Scott. Appreciate it.