Solved
Formula giving #ERROR! instead of empty cell
What is wrong with my formula that it is producing "#ERROR!" instead of an empty cell when {Most Recent Completed Event Date} is blank?
DATETIME_FORMAT(IF({Most Recent Completed Event Date}, DATEADD({Most Recent Completed Event Date}, 9, 'month'), ""), 'M/D/YYYY')
It is working perfectly for the ones that have a date in that field (e.g., if "Most Recent Completed Event Date" is 5/13/2023, it gives me 2/13/2024). If "Most Recent Completed Event" is empty, I want the formula to leave the cell empty, hence why I put the empty quotes as the alternative option. But instead, it gives me "#ERROR!"
I tried looking up similar questions but I'm stumped. Thank you!
Best answer by kuovonne
You are getting the error because the date functions expect a date input but are getting a blank instead. Also, unless there is a specific reason why you want the result to be a text string instead of a date object, you don't need DATETIME_FORMAT().
Try using this simpler formula.
IF(
{Most Recent Completed Event Date},
DATEADD({Most Recent Completed Event Date}, 9, 'month')
)
Login to the community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
