Deleting everything after the first space in a cell

oveste

New Member
Joined
Aug 30, 2010
Messages
9
I need to delete all data after the first space in every row of a column. Any clues?
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Assuming your data is in Col A, use the following formula in another column:

=LEFT(A1,Find(" ",A1)-1)

Copy down. If you want to compeltely replace the data in Col A, then copy>paste special these new values onto Col A.
 
Upvote 0
Thanks,
I new it had to be a LEFT or RIGHT function. I was unfarmiliar with the FIND function.
 
Upvote 0
If you want to avoid the error if there is no space:

=LEFT(A1,FIND(" ",A1&" ")-1)
 
Upvote 0
I have tried the formula posted and after applying it to a doc that i am working on it returns a cyclic refrence and gives me a zero, i have text in column E that i wish to apply this to that starts at row 105, examples of the data are,

ABST22112 2" x 2" x 1-1/2" ABS SANITARY TEE
XPVCT2112112 2"x11/2"x11/2" PVC DWV SANITARY TEE
XPVCT21122 2"x 1-1/2"x 2" PVC DWV SANITARY TEE

and i am editing the formula to be =LEFT(F103,FIND(" ",F103)-1) just not sure what i am doing wrong. fairly new to Excel Formulas.
 
Upvote 0
The cyclic reference comes when you insert a formula which includes the own address of the cell. e.g. you are inserting formula stated above in the same cell F103. If it is so (especially if your data is in column E) then you need to change it like:
=LEFT(E103,FIND(" ",E103)-1)
 
Upvote 0
Assuming your data is in Col A, use the following formula in another column:

=LEFT(A1,Find(" ",A1)-1)

Copy down. If you want to compeltely replace the data in Col A, then copy>paste special these new values onto Col A.

Hi,
I have a similar requirement, but need to delete everything after the 2nd space in a cell.

Any advise?
 
Upvote 0
Hi,
I have a similar requirement, but need to delete everything after the 2nd space in a cell.
Give this formula a try (also works if there are not two spaces...returns what's there)...

=LEFT(A1,FIND(" ",A1&" ",FIND(" ",A1&" ")+1)-1)
 
Upvote 0

Forum statistics

Threads
1,214,901
Messages
6,122,157
Members
449,068
Latest member
shiz11713

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top