ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HELP: extract certain characters from text string (https://www.excelbanter.com/excel-programming/441633-help-extract-certain-characters-text-string.html)

Sam

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

Paul

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


Mike H

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


JLGWhiz[_2_]

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




Otto Moehrbach[_2_]

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




All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com