Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP: extract certain characters from text string
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP: extract certain characters from text string
Try: =LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,255) Assuming A1 holds the text "John Doe". Fill down as many rows as necessary. sam;698465 Wrote: 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 -- Paul - Paul ------------------------------------------------------------------------ Paul's Profile: http://www.thecodecage.com/forumz/member.php?u=1697 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=195384 http://www.thecodecage.com/forumz |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP: extract certain characters from text string
Sam,
Try this and drag down =LEFT(A2,1)&MID(A2,FIND(" ",A2)+1,999) -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "sam" wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP: extract certain characters from text string
Try this:
=LOWER(LEFT(A1,1)&RIGHT(A1,LEN(A1)-FIND(" ",A1))) Otto "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Extract characters from Right of string | Excel Worksheet Functions | |||
How to extract specific text from a string of characters | Excel Worksheet Functions | |||
Extract all text without spaces and special characters | Excel Worksheet Functions | |||
Extract string w/ 7 characters | Excel Programming | |||
Extract string after specific characters | Excel Programming |