I'm trying to extract some numbers from a few cells that each have a large body of text.
The number strings are accompanied by certain words that precede the number string I'm trying to extract.
I've tried solving the problem by using functions like MID, LEFT, RIGHT, LEN, FIND and SEARCH However I keep ending up with the wrong result.
This is due to three issues with the bodies of text:
- The first issue is that the words that precede it are different for each cell. This would make the formula highly complex and in need of IF, OR, or AND functions.
- The second issue issue is that the number string I'm trying to extract has a varying length between 7 and 10 numbers long
- The third issue is that the number only string I'm trying to extract isn't the only number string in the body text of the cells
The solution I currently have adds other characters other than numbers ;such as spaces, comma's, and brackets if the number string is less than 10 numbers long.
So basically I want to know if there is a way to extract the first number only string that is between 7-10 characters long from the body of text? Preferably with formula's only but VBA is a possibility as well.
Figured I'd edit the OP with the data examples since I haven't received a reply yet.
An example of the data I'm trying to manipulate can be found here: https://www.sendspace.com/file/f7kn6n
Since I haven't received a response in a while I figured I would update with a screenshot of the example data I uploaded a few days ago.