Hello,
I have a column of cells that can be anywhere from 0 characters - 2,000 characters. I am trying to extract from this cell a code; if the code exists - extract it, if it doesn't, tell me it doesn't. The code always starts with "OL_" and is followed by numbers (i.e OL_123, OL_4562, OL_90). This code can be anywhere within the cell. Also, it is possible that there is a letter value which is after the last number (i.e. OL_56234a, OL_90H). I do not want those letter values.
I hope the below helps to see what I need. Column B are the results I need.
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]OL_123 - Please Keep
[/TD]
[TD]OL_123
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]OTHER: OL_4362465 - Discard
[/TD]
[TD]OL_4362465
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]Other: OL_010a
[/TD]
[TD]OL_010
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]OL_555a - Trust
[/TD]
[TD]OL_555
[/TD]
[/TR]
</tbody>[/TABLE]
I have a column of cells that can be anywhere from 0 characters - 2,000 characters. I am trying to extract from this cell a code; if the code exists - extract it, if it doesn't, tell me it doesn't. The code always starts with "OL_" and is followed by numbers (i.e OL_123, OL_4562, OL_90). This code can be anywhere within the cell. Also, it is possible that there is a letter value which is after the last number (i.e. OL_56234a, OL_90H). I do not want those letter values.
I hope the below helps to see what I need. Column B are the results I need.
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]OL_123 - Please Keep
[/TD]
[TD]OL_123
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]OTHER: OL_4362465 - Discard
[/TD]
[TD]OL_4362465
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]Other: OL_010a
[/TD]
[TD]OL_010
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]OL_555a - Trust
[/TD]
[TD]OL_555
[/TD]
[/TR]
</tbody>[/TABLE]