Help

Combining two formulas to stop blanks returning errors

Topic Labels: Formulas
836 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Becky_Taylor
4 - Data Explorer
4 - Data Explorer

I’ve created a formula to subtract no.of days from a date, this has worked, however a number of the fields are blank so returning an error, I’ve created a separate formula for that too which also works, but I don’t know how to join them together in the same formulae?

DATEADD({Date auto-renew goes into effect},-{Auto renew notice period},‘days’)

IF({Date auto-renew goes into effect}, " ")

1 Reply 1

Hi @Becky_Taylor - you can combine these like this:

IF({Date auto-renew goes into effect}, DATEADD({Date auto-renew goes into effect}, -{Auto renew notice period},'days'))

Which is saying:

“if the date field is populated, then do the DATEADD formula”

You’ll notice that there’s no empty field ("")noted in the IF statement. You only need to provide this if there is an alternative value. If you just want it to be be blank if there’s no date field populated, then you can leave this out.