A formula to return characters between text and the next semicolon in a cell
Column A always contains the information "PLAN 1234;"
- The semicolon is always the third semicolon.
- The plan numbers are alphanumeric and can be any length.
I need to return just the plan number without "PLAN " but not sure what I'm misunderstanding about how to use FIND, LEN, etc. I can get the individual functions to work but not when I combine them.
Best Answers
-
This worked:
=MID(A@row, FIND("PLAN ", A@row) + 5, VALUE(FIND(";", A@row, FIND("PLAN ", A@row))) - VALUE(FIND("PLAN ", A@row) + 5))
-
Hi @Coffee
See if this works for you, presuming that "PLAN " always appears before the number.
=MID(LEFT([Column1]@row, FIND(CHAR(1), SUBSTITUTE([Column1]@row, ";", CHAR(1), 3)) - 1), FIND("PLAN ", [Column1]@row) + 4, LEN([Column1]@row))
Change [Column1] to the name of your column.
Hope this helps!
Answers
-
In case it helps, this my last attempt:
=MID(A@row, FIND("PLAN ", A@row) + 5, LEN(RIGHT(A@row, LEN(A@row) - VALUE(FIND(";", A@row, FIND(";", A@row, FIND(";", A@row)))))))
This is starting in the right place but I don't know how to get it to end at the third semicolon in the cell/first semicolon after "PLAN "
-
This worked:
=MID(A@row, FIND("PLAN ", A@row) + 5, VALUE(FIND(";", A@row, FIND("PLAN ", A@row))) - VALUE(FIND("PLAN ", A@row) + 5))
-
Hi @Coffee
See if this works for you, presuming that "PLAN " always appears before the number.
=MID(LEFT([Column1]@row, FIND(CHAR(1), SUBSTITUTE([Column1]@row, ";", CHAR(1), 3)) - 1), FIND("PLAN ", [Column1]@row) + 4, LEN([Column1]@row))
Change [Column1] to the name of your column.
Hope this helps!
-
That works! Thank you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 219 Industry Talk
- 457 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!