Extract a Number from a cell, the position of the number varies
Problem: I have a task name column and within this contains a number that I'm trying to extract. The number is always formatted with CRXXXXXX. The location of CRXXXXXX in the column varies from row to row.
Goal: I want to extract the number from the task column.
Example:
CR123456 would be 123456 a new cell.
I have seen several ways to extract if the information is always in the same place.
Frank Smith, PMP
Assistant Director | IT Special Projects Mgr.
Oregon Parks & Recreation Department
If my response helps, please mark it as an accepted answer. 😎
Best Answers
-
Will the number always be together? And will it always end with a number?
You could use a variation on the MID formula, i.e.
=MID(Cell@row,COUNT(FIND{0,1,2,3,4,5,6,7,8,9},Cell@row)),X)
-
I found a solution and thanks to @Parker Oxford for pointing me in the right direction.
Here is my solution:
=IFERROR(VALUE(MID([Task Name]@row, FIND("CR", [Task Name]@row) + 2, 6)), " ")
Frank Smith, PMP
Assistant Director | IT Special Projects Mgr.
Oregon Parks & Recreation Department
If my response helps, please mark it as an accepted answer. 😎
Answers
-
Will the number always be together? And will it always end with a number?
You could use a variation on the MID formula, i.e.
=MID(Cell@row,COUNT(FIND{0,1,2,3,4,5,6,7,8,9},Cell@row)),X)
-
Yes the number will always be together and CR123456 will always end in a number.
In reviewing your formula what would the X represent?
Can you provide a little more clarification on the formula.
Thanks!
Frank Smith, PMP
Assistant Director | IT Special Projects Mgr.
Oregon Parks & Recreation Department
If my response helps, please mark it as an accepted answer. 😎
-
I found a solution and thanks to @Parker Oxford for pointing me in the right direction.
Here is my solution:
=IFERROR(VALUE(MID([Task Name]@row, FIND("CR", [Task Name]@row) + 2, 6)), " ")
Frank Smith, PMP
Assistant Director | IT Special Projects Mgr.
Oregon Parks & Recreation Department
If my response helps, please mark it as an accepted answer. 😎
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!