Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jim Jim is offline
external usenet poster
 
Posts: 615
Default =TRIM(LEFT(B50,FIND(" ",B50)-1))

Hello,

Thanks for the help. How would I write this formula so that it avoids
errors if the referenced cell is blank?

=TRIM(LEFT(B50,FIND(" ",B50)-1))

Thanks
Jim
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default =TRIM(LEFT(B50,FIND(" ",B50)-1))

Try this...

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

--
Biff
Microsoft Excel MVP


"Jim" wrote in message
...
Hello,

Thanks for the help. How would I write this formula so that it avoids
errors if the referenced cell is blank?

=TRIM(LEFT(B50,FIND(" ",B50)-1))

Thanks
Jim



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default =TRIM(LEFT(B50,FIND(" ",B50)-1))

There are two conditions that would give you an error.

1. Blank cell

2. Non-blank cell but no spaces.

If you sure there will only be a blank cell or text string containing a
space then

=IF(B50="","",TRIM(LEFT(B50,FIND(" ",B50)-1)))

Elsewise

=IF(ISERROR(TRIM(LEFT(B50,FIND(" ",B50)-1))),"",TRIM(LEFT(B50,FIND("
",B50)-1)))


Gord Dibben MS Excel MVP

On Thu, 14 Jan 2010 13:56:02 -0800, Jim
wrote:

Hello,

Thanks for the help. How would I write this formula so that it avoids
errors if the referenced cell is blank?

=TRIM(LEFT(B50,FIND(" ",B50)-1))

Thanks
Jim


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default =TRIM(LEFT(B50,FIND(" ",B50)-1))

Looking good Biff

Why can't I do things like that?

If I had to build a house I would de-forest the country<g


Gord

On Thu, 14 Jan 2010 17:09:47 -0500, "T. Valko"
wrote:

Try this...

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


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default =TRIM(LEFT(B50,FIND(" ",B50)-1))

If I had to build a house I would de-forest the country<g

Yeah, but I'll bet you'd have a very sturdy house!

--
Biff
Microsoft Excel MVP


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Looking good Biff

Why can't I do things like that?

If I had to build a house I would de-forest the country<g


Gord

On Thu, 14 Jan 2010 17:09:47 -0500, "T. Valko"
wrote:

Try this...

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




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
"Find" a wildcard as a place marker and "replace" with original va Eric Excel Discussion (Misc queries) 1 January 27th 09 07:00 PM
=SUMPRODUCT(--(TRIM(A1:A10)<"")), what does the "--" mean? Ray Excel Worksheet Functions 2 August 28th 08 09:05 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 02:54 AM
How to change the default in Excel from "find next" to "find all" igs Excel Discussion (Misc queries) 0 November 27th 06 07:20 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 03:23 AM


All times are GMT +1. The time now is 05:01 AM.

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"