Truncate vaiable text strings???

esponapule

New Member
Joined
Sep 30, 2009
Messages
5
Is there a formula to remove everything after a certain character for variable text strings?

for example:

Turnthis...
Code:
Single basin|,Double basin|,Triple basin|
Double handle|,Single handle|,Touchless|
Single hole|,Two holes|,Three holes|,Four holes|,Single hole with deck plate|
into this:
Code:
Single basin
Double handle
Single hole


Thanks!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
THAT WORKED!!!

I had to change it a little, a1 is the result so I used col. B

THANKS!! I also learned a new command too!

awesome :)
 
Upvote 0
Now, if you have some strings that don't have the | character, you will want to do this instead:
=LEFT(B1,FIND("|",B1&"|")-1)

Excel Workbook
BC
1Single basin|,Double basin|,Triple basin|Single basin
2Double handle|,Single handle|,Touchless|Double handle
3Single hole|,Two holes|,Three holes|,Four holes|,Single hole with deck plate|Single hole
4Single BasinSingle Basin
Sheet1
 
Upvote 0

Forum statistics

Threads
1,215,545
Messages
6,125,448
Members
449,227
Latest member
Gina V

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