Formula Question - If not blank, return cell value

Would like to concatenate several cells and have that formula:

=[Product Codes]@row + "-" + [Unique ID]@row + "-" + [Deliverable Code]@row


Would like to add a cell only if the cell has content along with a dash preceding. Keeps coming back as unparseable. What am I doing wrong??

=[Product Codes]@row + "-" + [Unique ID]@row + "-" + [Deliverable Code]@row + IF([State]@row "", + "-" [State]@row)


Best Answer

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭
    edited 10/23/23 Answer ✓

    Hi @sabauml,

    Amend your formula slightly. For example:

    =[Product Codes]@row + "-" + [Unique ID]@row + IF([Deliverable Code]@row <> "", "-" + [Deliverable Code]@row) + IF(State@row <> "", "-" + State@row)

    Example output:


    Hope this helps, but if you've any problems/questions then just post.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!