Fine Text between Dashes in Excel

khanzgem

New Member
Joined
Nov 7, 2015
Messages
16
Hello,

I need to find out text between the dashes.

JAWAD AHMAD SAHIBZADA - Sem-1 - MSEM-F2018 - R.No.MS 155-2018 Fee Deposited.
1.Between 1st & 3rd Dashes ( Sem-1)
2.Between 3rd & 5th Dashed ( MSEM-F2018)

 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Assuming that you can use " - " as the delimiter (rather than just a dash), you can get the two values with the following formulas:
(B112 holds your data):

Code:
=TRIM(MID(SUBSTITUTE(B112," - ",REPT(" ",100)),100,100))

returns
Sem-1

and

Code:
=TRIM(MID(SUBSTITUTE(B112," - ",REPT(" ",100)),200,100))

returns
MSEM-F2018
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

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