Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 216
Default Need function to return numbers at beginning of text

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 216
Default Need function to return numbers at beginning of text

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.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Need function to return numbers at beginning of text

Try this...

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

--
Biff
Microsoft Excel MVP


"Nadine" wrote in message
...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make the home key return to the beginning of the row? maryj Excel Discussion (Misc queries) 1 February 25th 08 06:43 PM
Find $ in a string of text and return numbers Craig Excel Discussion (Misc queries) 5 September 13th 06 10:42 PM
Get different numbers to return text?? Curalice Excel Worksheet Functions 6 January 19th 06 08:20 PM
Removing numbers from the beginning of a text string Night Owl Excel Worksheet Functions 3 May 13th 05 05:52 PM
How to reformat numbers stored as text (apostrophe at beginning) Dave Excel Discussion (Misc queries) 1 May 11th 05 02:34 AM


All times are GMT +1. The time now is 06:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"