Multiple 'if' queries to return value IF status = DJ Name

Hi all, I am currently struggling with getting a formula created for the following scenario.

We are a DJ company, we assign a DJ to a lead by using the (DJ) status column. We then want to use a formula which obtains the DJ’s email address dependant on the DJ that is assigned so we can use the email for a calendar invite automation.

The formula currently works using a single line:
IF({DJ}=“DJ NAME","djemail@website.co.uk”)

However, we have over 10 DJ’s and want to repeat this formula to pull the email address of the assigned DJ. What would be the correct way to format the ‘OR’ to continue to find the required value? Currently I have pasted the above formula again for each DJ, but this doesn’t work. I have also tried using a comma and also an OR, but maybe the format I have used is incorrect?

For your scenario, a switch statement would be neater:
SWITCH({DJ},“Bob","bob@djemail.com,“Harry”,"Harry@djemail2.com",“Sue”,"Sue@djemail3.com")

If you get lots of DJs, or they vary alot, it maybe worth considering having the DJs listed in a separate board, and using the VLOOKUP add-in.

Regards
Matthew

1 Like

Hey Matthew,

Thanks so much for the feedback, you have saved me so much time… thank you!

I agree a VLOOKUP would probably be a better way to deal with data like this and will probably keep our lead board cleaner, so I will look at adding this in, in the near future.

For now, using the switch formula, do you know if there’s a way to keep the formula blank or fill in a ‘false’ value if none of the DJ’s are assigned?

Many thanks for your help,
Nik

Simply add an extra argument at the end

SWITCH({DJ},"Bob","bob@djemail.com""Harry","Harry@djemail2.com","Sue","Sue@djemail3.com","false")

Cheers, your answer was halfway there :slight_smile: below is what I did to complete the output required where if there is no DJ selected, it shows ‘No DJ Assigned’

SWITCH({DJ},“DJ Name","djemail@website.co.uk”,“DJ Name 2","djemail2@website.co.uk”,“”,“No DJ Assigned”)

Thank you all for your help!!

EDIT - Actually I noticed there was an issue with my formula as Monday.com wasn’t recognising one of the quotations, so that’s why I had to add some additional fields at the end to show the ‘No DJ Assigned’. Now I fixed the quotation, your solution works for the default value @GCavin :slight_smile: