# Microsoft Office Application Help - Excel Help forum > Excel Programming / VBA / Macros >  >  Keeping only the text before the first space

## bernborough

Hello,

I am hoping this is an easy question to answer.

If my cell contents read "19/4/2010 David", how do I have another cell show only the text before the first space ie. before David.

I say first space because the length of the date and the length of the name is going to vary.

For that matter, I would also like to know how to keep only the text beginning after the space.

Thanks,

Trent

----------


## daddylonglegs

If data is in A1 try this formula for everything before the space

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

and for everything after

=REPLACE(A1,1,FIND(" ",A1),"")

----------


## bernborough

Sorry all, I have found the answer.

=RIGHT(A1,LEN(A1)-FIND(" ",A1))  or

=LEFT(A1,LEN(A1)-FIND(" ",A1))

----------


## bernborough

Thanks Daddy.

I might persist with Google with these smaller queries so I don't waste anyone's time here.

----------


## daddylonglegs

The first of those is OK to return "David" from your example (although I prefer my suggestion  :Smilie:  )

Don't know what the second one should do, it doesn't return the date in your example.....

----------


## bernborough

It seems to work for me.

Thanks for your attention Daddy.

How do I mark this thread as SOLVED?

----------

