Re: 93245 - descr-ip24tion: Q-how do i only extract 93245?

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



Assuming your data is in A1, use this to extract the number before the
hyphen:

=TRIM(LEFT(A1,FIND("-",A1)-1))*1

Your example has a space before the hyphen, so TRIM will get rid of
that. Multiplying by 1 converts the result to a number, but you can
leave this off if you want it as a text value. Copy the formula down
as required.

Hope this helps.

Pete




On Mar 27, 1:08 am, ChrisV <Chr...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,

I have a number and a description (which may at times also contain a number
as well as -) within a cell in excel separated  by a - . How do i extract
only the number at the front as in the subject. Numbers are of varying
lengths.

Regards,

Chris

.



Relevant Pages

  • How to extract text from number/text cell
    ... Excel 2003 - how can I extract JUST the text from cells that contain varying ... lengths of numbers and text with no symbol or visible separator? ...
    (microsoft.public.excel.worksheet.functions)
  • Re: [PHP] does function extract() trim?
    ... does function extract() trim? ... On 28 Mar 2008, at 21:14, Lamp Lists wrote: ...
    (php.general)
  • Updating an entire table
    ... characters long, i have another 80 characters of white space.. ... I am trying to UPDATE the entire table to trim the white space off the ends ... Each value is different lengths, ...
    (microsoft.public.sqlserver.server)
  • Re: Ping Mike Moroney: NH-1B & NH GIS observations
    ... The .dbf has lots of info that I can use to add lengths and so forth, ... since I should be able to extract what I want from it. ... Laugh out loud! ...
    (misc.transport.road)
  • Re: newbie: print fields of a record in one line
    ... On 2006-03-13, felix wrote: ... I want to extract from txt files with varying number of lines different ...
    (comp.lang.awk)