How do I pull the fourth, fifth and sixth name from a multiple-contact column?
In Smartsheet I have a contact column (Project Support) that can have up to six contacts (first name + last name), for example Jane Doe. I then have six other Test/Number columns that pull the first contact, the second contact, the third contact, the fourth contact, the fifth contact and the sixth contact.
The first contact column is Project Support 1 and the formula is =LEFT([Project Support]@row, FIND(",", [Project Support]@row + ",") - 1)
.
The second contact column is Project Support 2 and the formula is =IFERROR(IF(COUNTM([Project Support]@row) = 2, RIGHT([Project Support]@row, LEN([Project Support]@row) - FIND(",", [Project Support]@row)), IF(COUNTM([Project Support]@row) = 3, MID([Project Support]@row, FIND(",", [Project Support]@row) + 2, LEN([Project Support]@row) - FIND(",", [Project Support]@row) - (LEN([Project Support]@row) - FIND(",", SUBSTITUTE([Project Support]@row, ",", "&", 1))) - 2), "")), "")
.
The third contact column is Project Support 3 and the formula is =IF(COUNTM([Project Support]@row) = 3, MID([Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row) + 1) + 2, LEN([Project Support]@row)), "")
.
The fourth contact column is Project Support 4 and the formula is =IF(COUNTM([Project Support]@row) >= 4, MID([Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row) + 1) + 1) + 2, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row) + 1) + 1) + 1) - FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row) + 1) + 1) - 2), "")
.
The fifth contact column is Project Support 5 and the formula is =IF(COUNTM([Project Support]@row) >= 5, MID([Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row) + 1) + 1) + 1) + 2, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row) + 1) + 1) + 1) + 1) - FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row) + 1) + 1) + 1) - 2), "")
.
The sixth contact column is Project Support 6 and the formula is =IF(COUNTM([Project Support]@row) = 6, MID([Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row, FIND(",", [Project Support]@row) + 1) + 1) + 1) + 1) + 2, LEN([Project Support]@row)), "")
.
The formulas work when there are 0, 1, 2 or 3 contacts in the Project Support column but breaks apart in different ways when there are 4, 5 or 6 contacts. Below is an image that shows that breakage. Any suggestions on what I’m missing?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!