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 )
MUHAMMAD SABEEL AFRIDI - Sem-1 - MSEM-F2017 - R.No.MS 48-2017
UMER FAROOQ - Sem-1 - MSCS-F2017 - R.No.MS 49-2017 Fee Deposited.
JAHANGIR KHAN - Sem-1 - MSEE-F2017A - R.No.MS 47-2017 Fee Deposited.

<colgroup><col></colgroup><tbody>
</tbody>
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
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,214,788
Messages
6,121,597
Members
449,038
Latest member
Arbind kumar

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