Pull text between 2 characters in cell

krystalhaze

New Member
Joined
Jul 5, 2016
Messages
15
Hi All,
I'm sure someone has asked a similar question before, but tbh, I really wanted to get a direct answer to my specific question, so I don't have to spend time figuring out how to retrofit another answer. :P
I would like to pull out the contents from the middle of a cell between two vertical separators (|) - the length of the contents in the cells will vary.
Examples:
Serv1|Tab1|Col1 - want "Tab1"
Server1|Table1|Column1 - want "Table1"
TIA! :)
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi,

One way:


Book1
AB
1Serv1|Tab1|Col1Tab1
2Server1|Table1|Column1Table1
Sheet585
Cell Formulas
RangeFormula
B1=TRIM(MID(SUBSTITUTE(A1,"|",REPT(" ",99)),99,99))
 
Upvote 0
You're welcome, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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