Re: Multiple IF statements in a formula

491 1
Showing results for 
Search instead for 
Did you mean: 
5 - Automation Enthusiast
5 - Automation Enthusiast

Could someone please help troubleshoot this?

I’m trying to calculate an expiration date based on the service provided. I believe I shouldn’t really be using “or” here, but included this just to help illustrate what I’m trying to do. Each IF statement works individually but not when I try to string them together.

I have about 10 of these conditions that I’d like to check for.

IF({Service}=‘Heartguard Plus’,(DATEADD({Date Expires},1,“Month”)))
IF({Service}=‘Annual Exam’,(DATEADD({Date Expires},1,“Year”)))
IF({Service}=‘3 year Rabies’,(DATEADD({Date Expires},3,“Year”)))

Thanks for your help!

2 Replies 2

I recommend you use a SWITCH instead.

  'Heartguard Plus', DATEADD({Date Expires},1,"Month"),
  'Annual Exam', DATEADD({Date Expires},1,"Year"),
  '3 year Rabies', DATEADD({Date Expires},3,"Year")

Oh that looks much easier! I’ll give that a shot, thanks!