How to Find Between 3rd & 5th Dash

khanzgem

New Member
Joined
Nov 7, 2015
Messages
16
Assalam o Alaikum ( May Piece Mercy and Blessing of God on You)

How to find with the help of formula between 3rd & 5th Dash ( Red Colored )
[TABLE="width: 537"]
<colgroup><col></colgroup><tbody>[TR]
[TD="align: left"]MUHAMMAD SABEEL AFRIDI - Sem-1 - MSEM-F2017 - R.No.MS 48-2017[/TD]
[/TR]
[TR]
[TD="align: left"]UMER FAROOQ - Sem-1 - MSCS-F2017 - R.No.MS 49-2017 Fee Deposited.[/TD]
[/TR]
[TR]
[TD="align: left"]JAHANGIR KHAN - Sem-1 - MSEE-F2017A - R.No.MS 47-2017 Fee Deposited.[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
try this:

Code:
=LEFT(MID(MID(A1,SEARCH("-",A1)+2,LEN(A1)-SEARCH("-",A1)),SEARCH(" ",MID(A1,SEARCH("-",A1)+2,LEN(A1)-SEARCH("-",A1)))+3,LEN(MID(A1,SEARCH("-",A1)+2,LEN(A1)-SEARCH("-",A1)))-SEARCH(" ",MID(A1,SEARCH("-",A1)+2,LEN(A1)-SEARCH("-",A1)))),SEARCH(" ",MID(MID(A1,SEARCH("-",A1)+2,LEN(A1)-SEARCH("-",A1)),SEARCH(" ",MID(A1,SEARCH("-",A1)+2,LEN(A1)-SEARCH("-",A1)))+3,LEN(MID(A1,SEARCH("-",A1)+2,LEN(A1)-SEARCH("-",A1)))-SEARCH(" ",MID(A1,SEARCH("-",A1)+2,LEN(A1)-SEARCH("-",A1)))))-1)
 
Upvote 0
Hi,

You can try this:

=TRIM(MID(SUBSTITUTE(SUBSTITUTE(A1,"-","*",3),"-","!",4),FIND("*",SUBSTITUTE(SUBSTITUTE(A1,"-","*",3),"-","!",4))+1,FIND("!",SUBSTITUTE(SUBSTITUTE(A1,"-","*",3),"-","!",4))-FIND("*",SUBSTITUTE(SUBSTITUTE(A1,"-","*",3),"-","!",4))-1))
 
Upvote 0
For the particular data you are trying to retrieve, this formula should work...

=SUBSTITUTE(TRIM(MID(SUBSTITUTE(A1,"-",REPT(" ",200)),600,400))," ","-")
 
Upvote 0
Hi,

just to find the beginning of the red string: (the examples in column A)

Code:
in B1: =mid(A1;find("- ",A1, find("- ", A1)+1)+2)

regards
 
Upvote 0
Another option:
Code:
=TRIM(MID(A1,FIND("¬",SUBSTITUTE(A1,"-","¬",3))+1,FIND("¬",SUBSTITUTE(A1,"-","¬",5))-FIND("¬",SUBSTITUTE(A1,"-","¬",3))-1))
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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