Tuesday, September 24, 2019

Excel tip! Extract text from a string in a cell

=MID(E2,(SEARCH("V3/",E2,1)+3),50)

Where E2 is the text string, "V3/" is the text immediately before what you're trying to extract, +3 is the number of characters you've selected preceeding the text you're after and 50 is enough character to ensure you extract all the text you're after.

Of course, this works most easily when the text you're after is at the end of the string but the number of characters you're after varies.

You'd probably have to work on it a bit more to use it to extract text from the middle of a text string.

Something to come back to.

No comments: