Solved

Function to remove all character in a cell following the first space

Posted on 2013-01-26
3
223 Views
Last Modified: 2013-01-27
How can I remove all characters in a cell following the first space and remove the space also?

In other words...

"435678TD45   sgepr"

would result in...

"435678TD45" only.

--Steve
0
Comment
Question by:SteveL13
3 Comments
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 250 total points
ID: 38822470
=left(A1,find(" ",A1)-1)
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 250 total points
ID: 38822604
In the event you have any entries with no spaces, or blanks, that formula will return an error.

To return the whole string if there are no spaces:

=LEFT(A1,FIND(" ",A1&" ")-1)

This will return a zero-length string if A1 is blank.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
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 view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now