Utilizing a Join formula while KEEPING a "%" character.

Options

I have a column with multiple values inside it with a line break delimiter. It is a result of a Join formula which looks at more than 100 columns to join them together (there's typically no more than 3 values joined). The values being joined have a "%" after them in the source cells, but the join formula is not bringing the "%" with it. How do I keep the values coming in on separate lines within the cell AND keep a % after each?

Right now, the join formula is bringing the numbers needed together with line breaks within each cell, which is great. But the numbers in the source cells have %s after them, and they disappear when brought into this formula. Help!!! I need them to state #% [line break] #%, etc.

=JOIN([Column 1@row:[Column 100]@row, CHAR(10))

Tags:

Answers

  • SoS | Dan Palenchar
    SoS | Dan Palenchar ✭✭✭✭✭✭
    Options

    Hello @hannah_johnson,

    You can do this 2 ways, see below.

    Option 1

    Use this formula. I set it up with columns named V1, V2, V3.

    IF(ISNUMBER([V1]@row), [V1]@row * 100 + "%" + CHAR(10), "") + IF(ISNUMBER([V2]@row), [V2]@row * 100 + "%" + CHAR(10), "") + IF(ISNUMBER([V3]@row), [V3]@row * 100 + "%")

    The output looks like this:

    Option 2

    It looks like you are joining 100 columns, so it's probably not practical to expand the formula for all of those values. What you can do in this case is make 100 new columns where each column where have a formula that converts the % values into text values that display as a %. You can then JOIN(COLLECT()) these as you already have. It looks like this:

    To speed this process up you can copy a row to another Sheet than copy it back. All of your columns will appear in your Source sheet with a (1) after them. Then, in what will be Column 1 (1) you can input the formula:

    =IF(ISNUMBER([Column 1]@row), [Column 1]@row * 100 + "%")

    Once that is in you can just drag it to the other 99 columns.

    Finally, update your JOIN() formula to be

    =JOIN(COLLECT([Column 1 (1)]@row:[Column 100 (1)]@row, [Column 1 (1)]@row:[Column 100 (1)]@row, ISTEXT(@cell)), CHAR(10))

    Note I am using JOIN() with COLLECT() to only take in values that exist. With just JOIN() there will be blank rows representing any missing values. If you want these blank rows than just use the JOIN() portion.

    Access a published Sheet here or interact with it below:

    Hope this helps!

    If this helped, help me & the SSC by accepting it and reacting w/💡insightful, ⬆️ Vote Up, and/or ❤️Awesome.

    👨🏼💻 Dan Palenchar | School of Sheets Solutions Consulting | Smartsheet Aligned Gold Partner

    PS - If you have a follow up response use @Dan Palenchar so I get notified of your reply!

    I make YouTube videos answering community questions: see if yours is on the list here!

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭
    Options

    Hi @hannah_johnson,

    You should be able to do it with a single formula on the row (substitute your column names and this is assuming they're all consecutive:

    =JOIN(COLLECT([Column 1]@row:[Column Last]@row, [Column 1]@row:[Column Last]@row, NOT(ISBLANK(@cell))), "%" + CHAR(10)) + IF(COUNTM([Column 1]@row:[Column Last]@row) > 0, "%", "")

    Sample output:

    Hope this helps, but if you've any problems/questions, just let us know!

  • hannah_johnson
    Options

    @Nick Korna Ohhhh this gets me SO close. Our numbers are in decimals - any suggestions for a slight adjustment to your formula to multiply by 100? I have tried adding a few places and it isn't liking where I add it.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!