Is there a way to get two return values in an IF function?

Options
GTR
GTR
edited 03/19/24 in Formulas and Functions

For example, We have a drop column where the choices are home, office, or either... we would like if they chose the either option that values from two columns show up. We currently have this formula which is working fine to return just ONE answer... we would like the last IF HAS function to return both personal and professional email. Is there a way to do that??

=IF(HAS([Please note your communication preferences]@row, "NO, REMOVE me from BOTH MAILING and EMAIL lists"), "", IF(HAS([Please note your communication preferences]@row, "Yes, please send MAIL ONLY"), "", IF(HAS([Please note your email and mailing preferences]@row, "Mail and/or Email to HOME only"), [Personal Email Address]@row, IF(HAS([Please note your email and mailing preferences]@row, "Mail and/or Email to OFFICE only"), [Professional email address]@row, IF(HAS([Please note your email and mailing preferences]@row, "Mail and/or Email to EITHER home or office"), [Personal Email Address]@row)))))

Where is would look kind of like this:


Best Answers

  • Jason Albrecht
    Jason Albrecht ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @GTR

    try this...

    [Personal Email Address]@row +"; " + [Professional email address]@row

    Hope this helps and that you have a great day,

    Jason Albrecht MBA, MBus(AppFin), DipFinMgt

    LinkedIn profile - Open to work

  • Jason Albrecht
    Jason Albrecht ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @GTR

    Try this:

    Replace "[Personal Email Address]@row +"; " + [Professional email address]@row" with:

    IF(ISBLANK([Personal Email Address]@row), [Professional Email Address]@row, [Personal Email Address]@row +"; " + [Professional email address]@row)

    Hope this helps and that you have a great day,

    Jason Albrecht MBA, MBus(AppFin), DipFinMgt

    LinkedIn profile - Open to work

Answers

  • Jason Albrecht
    Jason Albrecht ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @GTR

    try this...

    [Personal Email Address]@row +"; " + [Professional email address]@row

    Hope this helps and that you have a great day,

    Jason Albrecht MBA, MBus(AppFin), DipFinMgt

    LinkedIn profile - Open to work

  • GTR
    Options

    That did it!! Thank you so much! :)

  • Jason Albrecht
    Jason Albrecht ✭✭✭✭✭✭
    Options

    Great news. Glad I could help, and thank you for letting us know.

    Hope this helps and that you have a great day,

    Jason Albrecht MBA, MBus(AppFin), DipFinMgt

    LinkedIn profile - Open to work

  • GTR
    Options

    @Jason Albrecht One more quick question... for same formula, but for a slightly different result:

    =IF(HAS([Please note your communication preferences]@row, "NO, REMOVE me from BOTH MAILING and EMAIL lists"), "", IF(HAS([Please note your communication preferences]@row, "Yes, please send MAIL ONLY"), "", IF(HAS([Please note your email and mailing preferences]@row, "Mail and/or Email to HOME only"), [Personal Email Address]@row, IF(HAS([Please note your email and mailing preferences]@row, "Mail and/or Email to OFFICE only"), [Professional email address]@row, IF(HAS([Please note your email and mailing preferences]@row, "Mail and/or Email to EITHER home or office"), [Personal Email Address]@row +"; " + [Professional email address]@row)))))


    What if instead of the formula returning BOTH personal and office... it returns the PERSONAL email... and IF Personal IS BLANK, then it returns the Office email?? Thank you again! :)

  • Jason Albrecht
    Jason Albrecht ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @GTR

    Try this:

    Replace "[Personal Email Address]@row +"; " + [Professional email address]@row" with:

    IF(ISBLANK([Personal Email Address]@row), [Professional Email Address]@row, [Personal Email Address]@row +"; " + [Professional email address]@row)

    Hope this helps and that you have a great day,

    Jason Albrecht MBA, MBus(AppFin), DipFinMgt

    LinkedIn profile - Open to work

  • GTR
    Options

    @Jason Albrecht You're the BEST! Thank you so much... it works perfectly!

  • Jason Albrecht
    Jason Albrecht ✭✭✭✭✭✭
    Options

    So glad to hear it. Thank you for the joy of helping out.

    Hope you have a happy Easter.

    Hope this helps and that you have a great day,

    Jason Albrecht MBA, MBus(AppFin), DipFinMgt

    LinkedIn profile - Open to work

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!