View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default extract certain characters from text string

You will have to change the range to your actual, but the rest will run as
is.

Sub dk()
Dim c As Range
For Each c In Range("B2:B7") '<<<change to actual
c.Characters(2, InStr(c, " ") - 1).Delete
Next
End Sub


"sam" wrote in message
...
Hi All,

How can I extract First letter from first name, remove the space between
first and last name and keep the last name?

For eg:
I have a list of Names in this format:
John Doe
Will Smith

and I want them like this:
jdoe
wsmith

Thanks in advance