Solved

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

Posted on 2013-06-13
5
227 Views
Last Modified: 2013-06-14
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
Comment
Question by:fordraiders
5 Comments
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 39245205
There is the obvious:

=LEFT(A1,7)

Why wouldn't that work?

Kevin
0
 
LVL 81

Accepted Solution

by:
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

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

Expert Comment

by:barry houdini
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

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

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

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

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

Join & Ask a Question