Return pattern of text

mib1019

Board Regular
Joined
Nov 9, 2017
Messages
66
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Thanks in advance for your help. I am looking for the text function that would return a substring matching a specific pattern from cells in a table. The substring position in the text is variable (beginning, middle or end), but always the same. Here are some sample cell values in Table, column 'Search Instance' (column C of worksheet)

GNRG000885 9117/2019 .. ChaS.e Fraud: Did you use
the property owner. GNRG000908 Dan Ke , PresiJ, _ , 10A /20
Bond Number: 63528033). GNRG000001

Need to extract the text GNRGXXXXXX from each.

Thanks!
MB
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi MB

Assuming always length 10.
Mappe11
AB
1GNRG000885 9117/2019 .. ChaS.e Fraud: Did you useGNRG000885
2the property owner. GNRG000908 Dan Ke , PresiJ, _ , 10A /20GNRG000908
3Bond Number: 63528033). GNRG000001GNRG000001
Tabelle1
Cell Formulas
RangeFormula
B1:B3B1=MID(A1,SEARCH("GNRG",A1),10)
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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