From: Nadine on
I have a column of cells that contain an id and description in one column. I
need a formula that will give me only the id. The id can be either 4 or 5
numbers. Some can be followed by a letter and some can be followed by a dash
and then a number. What they all have in common is that the id is followed
by a space and then the description.

So, the =LEFT formula will not work. I need on that can give me all
characters before the space regardless of whether that's after the first 5
characters or after 7 or 8 or however many there are before the space.
Anyone know of such a formula for Excel 2003? Thanks so much.
From: Nadine on
I found it! Sorry for bothering everyone.

"Nadine" wrote:

> I have a column of cells that contain an id and description in one column. I
> need a formula that will give me only the id. The id can be either 4 or 5
> numbers. Some can be followed by a letter and some can be followed by a dash
> and then a number. What they all have in common is that the id is followed
> by a space and then the description.
>
> So, the =LEFT formula will not work. I need on that can give me all
> characters before the space regardless of whether that's after the first 5
> characters or after 7 or 8 or however many there are before the space.
> Anyone know of such a formula for Excel 2003? Thanks so much.
From: T. Valko on
Try this...

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

--
Biff
Microsoft Excel MVP


"Nadine" <Nadine(a)discussions.microsoft.com> wrote in message
news:5624E8A5-EADC-41C2-95C6-6C6C0CD105E2(a)microsoft.com...
>I have a column of cells that contain an id and description in one column.
>I
> need a formula that will give me only the id. The id can be either 4 or 5
> numbers. Some can be followed by a letter and some can be followed by a
> dash
> and then a number. What they all have in common is that the id is
> followed
> by a space and then the description.
>
> So, the =LEFT formula will not work. I need on that can give me all
> characters before the space regardless of whether that's after the first 5
> characters or after 7 or 8 or however many there are before the space.
> Anyone know of such a formula for Excel 2003? Thanks so much.


 | 
Pages: 1
Prev: VLOOKUP returning formula
Next: spreadsheet