Extracting specific text from text string

CharlieRog

New Member
Joined
Sep 13, 2019
Messages
14
I am trying to extract a certain string of text from a bigger string of text.

I am looking to extract "OGEA********" the stars stand for numbers and each time they will be different, so the only bit of text which is the same is OGEA.

I have searched the internet and found.....

=TRIM(LEFT(SUBSTITUTE(MID(S2,FIND("OGEA",S2),LEN(S2))," ",REPT(" ",100)),100))

Where I have inputted 'OGEA' into the formula but keep getting #VALUE!

Any help please?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Can you provide some samples of the full strings.
 
Upvote 0
[Auto Comment]: Service Affecting set to No, at time Mon Jun 01 13:49:22 BST 2020;[Auto Comment]: Customer Details - Service ID: OGEA********;[Auto Comment]: Customer Details - Telephone Number: *********;




I have starred any customer specific data
 
Upvote 0
In the end I am looking to have a list of OGEA numbers and then I am trying to see if they exist in any of the cells which would have this text in. Almost like conditional formatting duplicates but I can't as it wouldn't highlight as a duplicate due to the other text in the cell
 
Upvote 0
Is this what you want?
Book1
AB
1[Auto Comment]: Service Affecting set to No, at time Mon Jun 01 13:49:22 BST 2020 
2[Auto Comment]: Customer Details - Service ID: OGEA********OGEA********
3[Auto Comment]: Customer Details - Telephone Number: ********* 
Sheet1
Cell Formulas
RangeFormula
B1:B3B1=IFERROR(MID(A1,FIND("OGEA",A1),99),"")
 
Upvote 0
How about
=TRIM(LEFT(SUBSTITUTE(REPLACE(S2,1,SEARCH("ogea",S2&"ogea")-1,""),";",REPT(" ",100)),100))
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,540
Messages
6,120,107
Members
448,945
Latest member
Vmanchoppy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top