Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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
?
253 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
[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
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

722 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