Extract text after two identical characters

dininaus

New Member
Joined
Jul 27, 2016
Messages
22
Hi All,

Probably simple I just cant figure it out how to do it, could someone please help me

I have column with filenames containing revision, status and format. I would like to extract all information except the file format. An example as below:

12345_ab.A.IFI.pdf
2432423.B.IFI.xlsm

I need to extract values as below

12345_ab.A.IFI
2432423.B.IFI

Thanks in advance.



 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
One way:

=LEFT(A1,SEARCH("^^^",SUBSTITUTE(A1".";"^^^",3))-1)
 
Upvote 0
with PowerQuery (Get&Transform)

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    ExtractBD = Table.TransformColumns(Source, {{"List", each Text.BeforeDelimiter(_, ".", {0, RelativePosition.FromEnd}), type text}})
in
    ExtractBD[/SIZE]

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#5B9BD5]List[/td][td][/td][td=bgcolor:#70AD47]List[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]12345_ab.A.IFI.pdf[/td][td][/td][td=bgcolor:#E2EFDA]12345_ab.A.IFI[/td][/tr]

[tr=bgcolor:#FFFFFF][td]2432423.B.IFI.xlsm[/td][td][/td][td]2432423.B.IFI[/td][/tr]
[/table]
 
Upvote 0
Tom.Jones's suggestion

=LEFT(A2,SEARCH("^^^",SUBSTITUTE(A2,".","^^^",3))-1)

expects 3 dots in the input string.

Another option is control+shift+enter, not just enter, and copy down:

=LEFT(A2,MATCH(9.99999999999999E+307,MATCH(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1),{"."},0))-1)
 
Upvote 0

Forum statistics

Threads
1,224,748
Messages
6,180,721
Members
452,995
Latest member
isldboy

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