Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract characters from Right of string ashg657 Excel Worksheet Functions 5 July 30th 09 11:16 AM
How to extract specific text from a string of characters rushdhih Excel Worksheet Functions 7 February 19th 09 09:58 AM
Extract all text without spaces and special characters Alfredo_CPA Excel Worksheet Functions 4 September 18th 08 11:39 PM
Extract string w/ 7 characters SteveDB1 Excel Programming 4 August 30th 08 02:05 AM
Extract string after specific characters [email protected] Excel Programming 7 July 11th 07 12:51 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"