A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Left function returning first word



 
 
Thread Tools Display Modes
  #1  
Old August 3rd, 2004, 10:02 PM
Richard Ruda
external usenet poster
 
Posts: n/a
Default Left function returning first word

We've done a search under help for a "left" function that will return the
first word in a column (so theoretically, the funtion is searching for the
first space and returning all characters to the left of it). It's possible
that this is a combination of functions. Help yould be appreciated.
Thanks
Richard



  #2  
Old August 3rd, 2004, 10:09 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Left function returning first word

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

--
Regards
Frank Kabel
Frankfurt, Germany


Richard Ruda wrote:
We've done a search under help for a "left" function that will return
the first word in a column (so theoretically, the funtion is
searching for the first space and returning all characters to the
left of it). It's possible that this is a combination of functions.
Help yould be appreciated. Thanks
Richard


  #3  
Old August 3rd, 2004, 10:30 PM
hgrove
external usenet poster
 
Posts: n/a
Default Left function returning first word

Frank Kabel wrote...
=TRIM(LEFT(A1,FIND(" ",A1)-1))


Um, why bother with TRIM? If the first character in A1 is a space, then
the LEFT call would return "", so nothing for TRIM to do. If the first
character in A1 weren't a space, then the LEFT call is guaranteed to
return a string with no space characters or a #VALUE! error if there
were no spaces at all in A1, and in both those cases nothing for TRIM
to do.

Did you mean

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

?


---
Message posted from http://www.ExcelForum.com/

  #4  
Old August 3rd, 2004, 10:53 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Left function returning first word

Frank Kabel wrote...
=TRIM(LEFT(A1,FIND(" ",A1)-1))


Um, why bother with TRIM? If the first character in A1 is a space,
then the LEFT call would return "", so nothing for TRIM to do. If the
first character in A1 weren't a space, then the LEFT call is
guaranteed to return a string with no space characters or a #VALUE!
error if there were no spaces at all in A1, and in both those cases
nothing for TRIM to do.

Did you mean

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


Hi Harlan
yes, screwed this formula. thanks for the correction!

Frank

  #5  
Old August 3rd, 2004, 10:55 PM
Richard Ruda
external usenet poster
 
Posts: n/a
Default Left function returning first word

Thanks guys, I'll try them..


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gripe about Word and image placement Harlan Messinger Page Layout 31 September 13th, 2004 04:16 PM
Writing a book in microsoft word, instructions how, newtknight Formatting Long Documents 10 June 22nd, 2004 09:35 PM
Differences between Word 2000 doc saved as word 6.0 and Word 6.0 doc Tony General Discussion 1 June 3rd, 2004 10:21 PM
Macros AnnaK General Discussion 1 May 20th, 2004 05:08 PM


All times are GMT +1. The time now is 04:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.