View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
chrishutson123 chrishutson123 is offline
external usenet poster
 
Posts: 2
Default Replace "FIRSTNAME LASTNAME" with "LAST"

Hello:

I have a cell with the string "FIRSTNAME LASTNAME". I would like to replace
it with "LAST". I have some special cases:

"MERRILL C CURRIER" should yield "CURR"
"JON SUN" should yield "SUN "
"JON C SUN" should yield "SUN "
"TRAVIS SMITH" should yield "SMIT"

Can anyone help? I am very appreciative. You should know that I am new to
VBA in Excel. Thanks.

Chris.