View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Brian Brian is offline
external usenet poster
 
Posts: 683
Default Pull out lastname

Formula wise, =RIGHT(A1,(FIND(" ",A1)-2)). You can work that into a macro if
need be.

"WLMPilot" wrote:

Cell A1 = "John Doe" (without quotes)

In a macro, I have the following:
name = Range("A1").Value

How to I pull out just the last name of the person in the variable name and
place it in the variable, lastname?

Thanks,
Les