• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

Extract everything from first space or if a space does not exist keep data intact

excel 2010.

need formula or routine.
=LEFT(A1,FIND(" ",A1)-1)
will not work..properly

I need to exttact data from cells before first space.
If a first space does not exist go ahead and still bring that information over..


7196k41 connectors
7196K41 Connector
7196K34 5-20 male plug 125v
7196K34
7196K32


end result:
7196k41
7196K41
7196K34
7196K34
7196K32

Thanks fordraiders
0
Fordraiders
Asked:
Fordraiders
1 Solution
 
zorvek (Kevin Jones)ConsultantCommented:
There is the obvious:

=LEFT(A1,7)

Why wouldn't that work?

Kevin
0
 
zorvek (Kevin Jones)ConsultantCommented:
Or, if the part number varies in length:

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

Kevin
0
 
SteveCommented:
Highlight the column and use Data > Text to Columns with Space as a delimiter?
0
 
barry houdiniCommented:
Try this small tweak to your original formula

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

by concatenating a space to the A1 value FIND always finds a space......

regards, barry
0
 
FordraidersAuthor Commented:
this one worked fine... Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now