EXCEL: remove data after a space

Solved
tecknorganik Posted messages 3 Status Membre -  
tecknorganik Posted messages 3 Status Membre -
Hello everyone,

I'm really a beginner with Excel. I'm looking for a command that would allow me to delete or separate data that comes after a space.

In fact, I'm trying to get the first name from a cell that contains three names.

Example: ADRIEN PHILIPPE PAUL
I would like to get: ADRIEN

I bet it's not complicated, but I need your help.

Thanks everyone!

Ben

Configuration: Windows XP / Safari 534.30

2 réponses

michel_m Posted messages 18903 Registration date   Status Contributeur Last intervention   3 320
 
Hello,

without VBA you can simply separate them using the "Data Convert" command
still without VBA, the formula giving the first name
=LEFT(A2;FIND(" ";A2)-1)

with VBA custom function
Function prenom1(cell As Range) As String prenom1 = Split(cell)(0) End Function


--
Michel
2