REMOVE CHARACTERS AFTER THE 2ND SPACE EXCEL

Solved
pygos Posted messages 202 Status Member -  
Polux31 Posted messages 7219 Status Member -
Hello,

I need a macro that removes the characters starting from the 2nd space.

Example:

14256 DUPONT Hector

would become 14256 DUPONT

Thank you in advance,

Best regards,

PYGOS

Configuration: Windows XP / Internet Explorer 6.0

3 answers

  1. Mytå Posted messages 4246 Registration date   Status Contributor Last intervention   957
     
    Hi forum

    In formula, it would be:

    =LEFT(C10;FIND(" ";C10;FIND(" ";C10)+1)-1)

    Mytå
    --
    Thank you for following up on your question, we are not robots...
    Installed versions [MsProject 2003(FR), Excel 2003-2007(FR)]
    4
  2. pygos Posted messages 202 Status Member
     
    What to reply? Other than:

    THANK YOU !! & CONGRATULATIONS !!

    Sincerely,

    Pygos
    0
    1. Polux31 Posted messages 7219 Status Member 1 204
       
      You're welcome

      Thank you for marking the post as resolved.

      Take care

      ;o)
      0
  3. Polux31 Posted messages 7219 Status Member 1 204
     
    Hello,

    Function troncMot(ByVal str As String) Dim c As String Dim i As Integer str = Trim(str) For i = Len(str) To 1 Step -1 c = Mid(str, i, 1) If c = " " Then troncMot = Trim(Mid(str, 1, i)) Exit Function End If Next i End Function


    ;o)
    --
    "What one conceives well is expressed clearly, and the words for it come easily."
    Nicolas Boileau
    -2