If the name doesn't have spaces, you could use a similar formula to the ones above. If sometimes it does have spaces and sometimes it doesn't, then it's a bit tougher.