Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

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

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

  • ✭✭✭✭✭✭
    Answer ✓

    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

  • ✭✭✭✭✭✭
    Answer ✓

    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

  • ✭✭✭✭✭✭
    Answer ✓

    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

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

  • ✭✭✭✭✭✭

    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

  • @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! :)

  • ✭✭✭✭✭✭
    Answer ✓

    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

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

  • ✭✭✭✭✭✭

    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!

Trending in Formulas and Functions

  • I'm trying to create a SUMIF formula that looks at the salesperson name in a column and adds up or totals their $ sales in another column. To ultimately show in Dashboard of Totals Sales by Salesperso…
    User: "Allan Z"
    Answered ✓
    9
    2
  • Good day Smartsheet Team, Getting an unparseable error on this formula: =IF($Name@row <> "",(SUMIFS({Expense}, {Period},1, {Type}, OR(@cell = "RES602782", @cell = "RES602497")),"") Trying to pull in a…
    User: "stratman"
    Answered ✓
    15
    2
  • I have a sheet that compiles all the responses from a form. The sheet has multiple start and end date columns, but only one start and one end date cell is NOT blank depending on the activity selected …
    User: "m_anderson"
    Answered ✓
    13
    2