This is a bit longwinded but it does work for middle names & middle initials.
=IF(ISERROR(SEARCH(" ",REPLACE(A1,SEARCH(" ",A1),1,""))),RIGHT(A1,LEN(A1)-FIND(" ",A1))&" "&LEFT(A1,FIND(" ",A1)-1),MID(REPLACE(A1,SEARCH(" ",A1),1,""),SEARCH(" ",REPLACE(A1,SEARCH(" ",A1),1,""))+1,LEN(REPLACE(A1,SEARCH(" ",A1),1,""))-SEARCH(" ",REPLACE(A1,SEARCH(" ",A1),1,"")))&" "&MID(A1,1,SEARCH(" ",REPLACE(A1,SEARCH(" ",A1),1,""))))
Essentially, if there is only one space in the field it goes through Mr Poulsom's formula, otherwise it strips out the first space in order to get at the surname, then sticks everything else in afterwards.
It will only work with one middle name though.
Hopefully someone with a bit more logic than me can simplify this!