Hello,
I was wondering if there's a function that allows me to chop characters
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 quot;-ABCquot; or the quot;-DEFquot; and be left with
12345
123456
Normally, I would simply use an =LEFT to capture the part I need, but
since the part before the dash is of varying lengths, I'm not sure how
to do this. Any help would be appreciated.
Thanks!--
dailygluttony
------------------------------------------------------------------------
dailygluttony's Profile: www.excelforum.com/member.php...oamp;userid=32907
View this thread: www.excelforum.com/showthread...hreadid=527259Try This:
=LEFT(A1,FIND(quot;-quot;,A1,1)-1) where A1 is your text.
quot;dailygluttonyquot; wrote:
gt;
gt; Hello,
gt;
gt; I was wondering if there's a function that allows me to chop characters
gt; of a fixed length off of text strings of varying lengths. For example,
gt; if I have the following strings:
gt;
gt; 12345-ABC
gt; 123456-DEF
gt;
gt; I want to be able to cut off the quot;-ABCquot; or the quot;-DEFquot; and be left with
gt;
gt; 12345
gt; 123456
gt;
gt; Normally, I would simply use an =LEFT to capture the part I need, but
gt; since the part before the dash is of varying lengths, I'm not sure how
gt; to do this. Any help would be appreciated.
gt;
gt; Thanks!
gt;
gt;
gt; --
gt; dailygluttony
gt; ------------------------------------------------------------------------
gt; dailygluttony's Profile: www.excelforum.com/member.php...oamp;userid=32907
gt; View this thread: www.excelforum.com/showthread...hreadid=527259
gt;
gt;
Data gt; 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
quot;dailygluttonyquot; gt;
wrote in message
news:dailygluttony.25e7sy_1143571503.8005@excelfor um-nospam.com...
gt;
gt; Hello,
gt;
gt; I was wondering if there's a function that allows me to chop characters
gt; of a fixed length off of text strings of varying lengths. For example,
gt; if I have the following strings:
gt;
gt; 12345-ABC
gt; 123456-DEF
gt;
gt; I want to be able to cut off the quot;-ABCquot; or the quot;-DEFquot; and be left with
gt;
gt; 12345
gt; 123456
gt;
gt; Normally, I would simply use an =LEFT to capture the part I need, but
gt; since the part before the dash is of varying lengths, I'm not sure how
gt; to do this. Any help would be appreciated.
gt;
gt; Thanks!
gt;
gt;
gt; --
gt; dailygluttony
gt; ------------------------------------------------------------------------
gt; dailygluttony's Profile:
gt; www.excelforum.com/member.php...oamp;userid=32907
gt; View this thread: www.excelforum.com/showthread...hreadid=527259
gt;
- Jul 20 Thu 2006 20:08
How do you truncate a text string?
close
全站熱搜
留言列表
發表留言