Concatenating columns based on two conditions

Hi,

I would like my first column to be a formula that combines columns A-B-C if a specific value is selected in a single select column and combines different columns if another value is selected in that same single select column.

I have a single select column called {Calendar} with 2 value options “Event” or “Series”.
If {Calendar} is selected to be “Event” I’d like the formula to combine {Calendar}&"-"&{Date}&"-"&{Client}&"-"&{Street}
If {Calendar} is “Series” I’d like the formula to combine {Calendar}&"-"&{Date}&"-"&{Site}&"-"&{Service}

I would appreciate any help - I am completely stuck and need this in order to merge my Event and Series bases.

Thank you! Alix

You’re looking for either the logical functions IF or SWITCH. You did a great job creating the initial formula, so I’ll let you try and figure out how to use them. Let me know if you have trouble.

Hi,

Thanks for the reply! I just can’t figure out how to combine these two ideas. I’ve been stuck for hours. I understand in concept what I want, but I don’t know if I have a small syntax error, or a larger problem. Any ideas?

Thanks,
Alix

Translation: SWITCH( calendar returns a value, if it returns “Event”, use this phrase, if it returns “Series”, use this phrase, otherwise return nothing )

SWITCH( {Calendar}, "Event", {Calendar}&"-"&{Date}&"-"&{Client}&"-"&{Street}, “Series”, {Calendar}&"-"&{Date}&"-"&{Site}&"-"&{Service},"" )

Otherwise, you could use a nested IF block.

1 Like

Thank you!!! This was a giant help!