Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-06-13
5
Medium Priority
?
258 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
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…

885 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