Combining multiple cells when one is blank

Jeana
Jeana ✭✭✭✭✭✭

I am using this formula to combine cells in a single row to create a unique name/identifer. This formula works fine.

=Suite@row + "_" + Offering@row + "_" + Module@row + "_" + [Additional Asset Name Detail (as needed)]@row + "_" + [Asset Type]@row + "" + "_" + FY@row

Producing this result.

MA_Test 2 offering_Test 2 Module_Additional Name_FG_FY22

The issue come in because the [Additional Asset Name Detail (as needed)] data is OPTIONAL. When nothing is entered in this cell then the formula produces the double underline between MODULE and FG, as seen here.

MA_Test 2 offering_Test 2 Module__FG_FY22

How can is use ISBLANK or some other function to remove this extra underline when the optional field is blank?

Best Answer

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    Answer ✓

    Hi @Jeana

    To add to Bassam's excellent advice/answer.

    Another method would be to use a combination of JOIN COLLECT.

    Try something like this.

    =JOIN(COLLECT(Suite@row:FY@row, Suite@row:FY@row, <>""), "_")
    

    Did that work/help?

    I hope that helps!

    Be safe and have a fantastic weekend!

    Best,

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

Answers

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭

    Hi @Jeana 

    Hope you are fine, Try to use the following formula:

    =IFERROR(IF(ISBLANK([Additional Asset Name Detail (as needed)]@row), Suite@row + "_" +
    Offering@row + "_" + Module@row + "_" + [Asset Type]@row + "" + "_" + FY@row, Suite@row +
    "_" + Offering@row + "_" + Module@row + "_" + [Additional Asset Name Detail (as needed)]@row +
    "_" + [Asset Type]@row + "" + "_" + FY@row), "")
    

    the following screenshot shows the result:


    PMP Certified

    bassam.khalil2009@gmail.com

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

  • Jeana
    Jeana ✭✭✭✭✭✭
  • Jeana
    Jeana ✭✭✭✭✭✭

    So if it's possible for ANY of the other cells to be blank would it look like this with the other condition added or do I need an OR in there somewhere?

    =IFERROR(IF(ISBLANK([Additional Asset Name Detail (as needed)]@row), Suite@row + "_" + Offering@row + "_" + Module@row + "_" + [Asset Type]@row + "" + "_" + FY@row, Suite@row + "_" + Offering@row + "_" + Module@row + "_" + [Additional Asset Name Detail (as needed)]@row + "_" + [Asset Type]@row + "" + "_" + FY@row), "", (IFERROR(IF(ISBLANK([Suite]@row), [Additional Asset Name Detail (as needed)]@row + "_" + Offering@row + "_" + Module@row + "_" + [Asset Type]@row + "" + "_" + FY@row, Suite@row + "_" + Offering@row + "_" + Module@row + "_" + [Additional Asset Name Detail (as needed)]@row + "_" + [Asset Type]@row + "" + "_" + FY@row), ""))

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    Answer ✓

    Hi @Jeana

    To add to Bassam's excellent advice/answer.

    Another method would be to use a combination of JOIN COLLECT.

    Try something like this.

    =JOIN(COLLECT(Suite@row:FY@row, Suite@row:FY@row, <>""), "_")
    

    Did that work/help?

    I hope that helps!

    Be safe and have a fantastic weekend!

    Best,

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

  • Jeana
    Jeana ✭✭✭✭✭✭

    SWEET!!! That's simpler in this case.

    Thanks Andrée!

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    @Jeana

    Excellent!

    Happy to help!

    Remember! Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭

    @Jeana

    You are welcome and I will be happy to help you any time, please help the Community by accepting the answer.

    PMP Certified

    bassam.khalil2009@gmail.com

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!