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

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Hello,

How do I write this formula so that the result is a blank cell if B47 is
blank? I get a #VALUE now.

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

Thanks so much for hte help
 
Another way:
=TRIM(LEFT(B47,FIND(" ",B47&" ")-1))

This will protect against B47 not having any space character, too.
 
And if you're going to use trim, you don't need to subtract 1. The =trim() will
remove the trailing space.

=TRIM(LEFT(B47,FIND(" ",B47&" ")))
 
Hi,

If I understand correctly you want to keep everything upto the first blank:

Select the cell or range (B47 here) and choose Data, Text to Columns,
Delimited, Next, specify Space as the delimiter and click Next. Select all
columns to the right of the first column in the preview area and choose Do
not import, Skip. Set a destination cell and click OK.
 
Back
Top