How do you truncate a text string?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




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 "-ABC" or the "-DEF" 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: http://www.excelforum.com/member.php?action=getinfo&userid=32907
View this thread: http://www.excelforum.com/showthread.php?threadid=527259

.



Relevant Pages

  • Re: Returning Partial Strings
    ... but the strings are of varying lengths. ... extract this? ... RAST 2006-1 M5 ...
    (microsoft.public.access.queries)
  • Re: How come Ada isnt more popular?
    ... dealing with strings of varying lengths. ... string package s make it possible to often use stack allocated storage ... only or get the comfort of unbounded strings. ...
    (comp.lang.ada)
  • Re: Returning Partial Strings
    ... but the strings are of varying lengths. ... extract this? ... John W. Vinson [MVP] ...
    (microsoft.public.access.queries)
  • Re: stripping out a text string
    ... >I have a column of cells with text strings of varying lengths. ... >characters of each string is an ID that I need to separate out from ...
    (microsoft.public.excel.worksheet.functions)