Extract characters after 2nd occurrence of a character but before the 3rd occurrence

easybpw

Active Member
Joined
Sep 30, 2003
Messages
437
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
Hello and thanks in advance for your help.

I have a string of letters/numbers and I want to extract the information after the 2nd occurrence of "." but before the 3rd occurrence. For example:

2580.18B.AMEX.58TU.214758.854.982560

My result needs to be AMEX. I can extract prior to and after but I have no idea how to extract between. I also want to be able to adjust the formula if I need to extract after the 3rd or 4thth occurrence. AMEX is no constant as it could be anything. So I'm asking how to I extract from after the 2nd occurrence of "." but before the 3rd occurrence of ".".

Thanks again!

Bill
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
If that example is indicative of the length of each piece roughly, try this for an entry in cell A1:

Between 2nd and 3rd occurrence:
Excel Formula:
=TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",100)),200,100))

Between 3rd and 4th occurrence:
Excel Formula:
=TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",100)),300,100))
 
Upvote 0
How about
+Fluff 1.xlsm
AB
1
22580.18B.AMEX.58TU.214758.854.982560AMEX
Main
Cell Formulas
RangeFormula
B2B2=FILTERXML("<k><m>"&SUBSTITUTE(A2,".","</m><m>")&"</m></k>","//m[3]")
 
Upvote 0

Forum statistics

Threads
1,214,797
Messages
6,121,629
Members
449,041
Latest member
Postman24

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