Trim unknown character return right not left

LINDAMG

New Member
Joined
Mar 30, 2017
Messages
8
Hi - I am trying to extract the back half of a text string. example: Linda Marie | LINDAM or Julie Smith Jones | JSJS. I want to bring back the LMGOVIN and the JSJS. Basically everything after the "|" (there are 2 spaces after the "|" if that matters.

I can get the item in front of the "|" with TRIM(LEFT(A1, FIND("|",A1)-2)),"") and tried variations to get the other half, but to no avail.

Anyway to get this to work?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Assuming it will always have only one | divider

Code:
=TRIM(MID(A1,FIND("|",A1)+1,LEN(A1)))
 
Upvote 0
Hi,

A couple more options:

B1 formula to extract everything After the pipe "|"

B4 formula copied across to extract everything Before the pipe in B4, and everything After the pipe in C4


Book1
ABC
1Linda Marie | LINDAMLINDAM
2Julie Smith Jones | JSJSJSJS
3
4Linda Marie | LINDAMLinda MarieLINDAM
5Julie Smith Jones | JSJSJulie Smith JonesJSJS
Sheet277
Cell Formulas
RangeFormula
B1=TRIM(REPLACE(A1,1,FIND("|",A1),""))
B4=TRIM(MID(SUBSTITUTE($A4,"|",REPT(" ",100)),COLUMNS($B4:B4)*100-99,100))
 
Upvote 0
If you don't have to use a formula, you could use Flash Fill or Text to Column to extract those - two quick options
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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