Struggling with nested IF formula

Hi guys,

I’m struggling to get this formula validated, which is odd as it’s been validated by an Excel master…?

IF(
{User status}=“New sign-up no story”,
“Send new sign-up email”,
IF(
{User status}="New sign-up story in new”,
“Send new story email”,
IF(
{User status}=“Sign-up no story”,
“Send sign-up no story email”,
IF(
{User status}="Sign-up Story in new”,
“Send new story email”,
IF(
{User status}=“Sign-up Story in draft”,
“Send story in draft email”,
IF(
{User status}="Sign-up story in published”,
“Send post-publication email”,
“Nothing”
)
)
)
)
)
)

Hi @Julien_Altoe!

I think this is just a text formatting issue with your quotation marks, but your code is fine. The quotations marks look mostly normal here, but when I copy and paste this formula, there are 2 types of quotation marks present. I just went through and replaced them all with standard quotations, and it worked fine for me.

Here’s the reformatted version, if it helps:
IF( {User status}="New sign-up no story", "Send new sign-up email", IF( {User status}="New sign-up story in new", "Send new story email", IF( {User status}="Sign-up no story", "Send sign-up no story email", IF( {User status}="Sign-up Story in new","Send new story email", IF( {User status}="Sign-up Story in draft", "Send story in draft email", IF( {User status}="Sign-up story in published", "Send post-publication email", "Nothing"))))))

Hope that helps. Welcome to the forums.

2 Likes

Brilliant, thanks a lot for the help and the quick turnaround Nick, much appreciated!

FYI You could do this a little cleaner with a single SWITCH() statement instead of several IF()s

SWITCH(
   {User status},

   "New sign-up no story",
   "Send new sign-up email",

   "New sign-up story in new",
   "Send new story email",

   "Sign-up no story",
   "Send sign-up no story email",

   "Sign-up Story in new",
   "Send new story email",

   "Sign-up Story in draft",
   "Send story in draft email",

   "Sign-up story in published",
   "Send post-publication email",

   "Nothing"
)
3 Likes

Yes, I tried as well but obviously didn’t work either due to the wrong brackets.

Now it works, I shall definitely use that interesting SWITCH next time, many thanks!