View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default find beginning of line to first space?

on 4/27/2011, Lance supposed :
Hello all,

I have some cells that look like this

1 One
02 Two
003 Three
4 Four
000005 Five

and I am looking for a way to cut and paste the number into a new column. I
am guessing I should search and select anything from
the beginning of the line to the first space. I could then cut this value
and place it elsewhere.

I am not certain how to perform this kind of search in Excel though?
Could someone give me an example of how to search from the beginning of
a cell to the first space?

TIA,

Lance


Enter the following formula into the cell[s] where you want the
results.

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

Be sure to change the ref to 'A1' to match the 1st source cell, then
copy down (or to) other cells as desired.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc