You might want to check for the case where the cell has no spaces:

=IF(ISERR(LEFT(A4,FIND(" ",A4))),A4,LEFT(A4,FIND(" ",A4))&TRIM(RIGHT(SUBSTITUTE(A4," ",REPT(" ",50)),50)))

All credit to Dom for the tricky part.

Regards