Hyphens between combined cell data when not blank
Hi,
I have the below formula to combine a number of cells together to make a naming convention. I want hyphens between each piece of information but only if the cell is not blank.
We only have a Program Code 2 about half the time, I don't want an extra hyphen in there when it's a blank cell.
The combined data at the moment looks like this code2 code1 - 3 - 123. I want it to look like this code2 - code1 - 3 - 123 or this if code 2 is blank code1 - 3 - 123
=[Program Code 2 ]@row + " " + [Program Code]@row + " - " + [Contract Type Helper ]@row + " - " + [System No. ]@row
Answers
-
Hi @kpassfield
I hope you're well and safe!
Try something like this. (if the columns are side by side in the same order as you wrote above)
=JOIN(COLLECT([Program Code 2]@row:[System No.]@row, [Program Code 2]@row:[System No.]@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, Awesome, 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.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 494 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!