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

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
 
D

Dave Peterson

Another way:
=TRIM(LEFT(B47,FIND(" ",B47&" ")-1))

This will protect against B47 not having any space character, too.
 
D

Dave Peterson

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&" ")))
 
S

Shane Devenshire

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top