Formula to find last occurrence of a word and return the word + 10 characters

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
938
Office Version
  1. 365
Platform
  1. Windows
I need help with a formula to find the last occurrence of a word, return that word plus 10 characters.

Keep in mind the source text will change but one thing that will remain consistent is the words I want to return will always be on the end and will state data in this order with this many characters: OPS 123 Rev 1

See below example:

Book1
ABC
1SourceCurrent FormulaDesired Result
2X:\QUALITY\Group\OPS Forms\Space\[OPS 277 Rev 3 - Workbook Series.xlsm]DataOPS Forms\SpacOPS 277 Rev 3
Sheet1
Cell Formulas
RangeFormula
B2B2="O"&MID(A2, FIND("OPS", A2) + 1,13)


Help on this formula would be greatly appreciated.

Thank you to anyone who can help!
 
Try:

Excel Formula:
=LET(x,TEXTSPLIT(A2,"OPS"),c,COLUMNS(x),"OPS"&LEFT(INDEX(x,c),10))
 
Upvote 0
How about
Excel Formula:
=LEFT(TEXTAFTER(A2,"[",-1),13)
 
Upvote 0
Solution

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