Solved

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

Posted on 2013-06-13
243 Views
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
Question by:fordraiders
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• Learn & ask questions

LVL 81

Expert Comment

ID: 39245205
There is the obvious:

=LEFT(A1,7)

Why wouldn't that work?

Kevin
0

LVL 81

Accepted Solution

zorvek (Kevin Jones) earned 500 total points
ID: 39245208
Or, if the part number varies in length:

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

Kevin
0

LVL 24

Expert Comment

ID: 39245343
Highlight the column and use Data > Text to Columns with Space as a delimiter?
0

LVL 50

Expert Comment

ID: 39245618
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

LVL 3

Author Closing Comment

ID: 39248180
this one worked fine... Thanks
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
###### Suggested Courses
Course of the Month5 days, 1 hour left to enroll

#### 738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.