How do you truncate a text string?

D

dailygluttony

Hello,

I was wondering if there's a function that allows me to chop character
of a fixed length off of text strings of varying lengths. For example
if I have the following strings:

12345-ABC
123456-DEF

I want to be able to cut off the "-ABC" or the "-DEF" and be left with

12345
123456

Normally, I would simply use an =LEFT to capture the part I need, bu
since the part before the dash is of varying lengths, I'm not sure ho
to do this. Any help would be appreciated.

Thanks
 
P

Peo Sjoblom

Data > text to columns, select delimited, click next, select - as other
delimiter click next select the right column and check do not import (skip)
under column data format. That way you can do a whole column in one fell
swoop


--

Regards,

Peo Sjoblom



"dailygluttony" <[email protected]>
wrote in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top