Solved

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

Posted on 2013-06-13
5
247 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 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

632 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