Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default in excel how to get initial from name

Hi, I want Initials of name in excel. Like in A1, I have
1) Lloyd L. Summers
2) Lloyd L Summers
I want L.L.S. in B1. Can I do that. Is there any formula?
if yes Then pls tell me.

  #2   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default in excel how to get initial from name

One way is to install & use the
UDF FrstLtrs below by Ron Rosenfeld (slightly adapted) ..
(UDF = user defined function)

To install the UDF:
Press Alt+F11 to go to VBE
Copy n paste the UDF into the code window (whitespace on right)
Press Alt+Q to get back to Excel

In Excel,
Assuming your data in A1 down,
put in B1: =frstltrs(A1)
copy down to extract the desired results

'--------
Function FrstLtrs(str As String) As String
Dim temp
Dim i As Long

temp = Split(Trim(str))

For i = 0 To UBound(temp)
FrstLtrs = FrstLtrs & Left(temp(i), 1) & "."
Next i

End Function
'-------

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,000 Files:370 Subscribers:66
xdemechanik
---
"thyagu" wrote:
Hi, I want Initials of name in excel. Like in A1, I have
1) Lloyd L. Summers
2) Lloyd L Summers
I want L.L.S. in B1. Can I do that. Is there any formula?


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,510
Default in excel how to get initial from name

Insert the following formula in B1.

Note it is one line even if it breaks in this post.

=LEFT(A1,1)&"."&MID(A1,FIND(" ",A1,1)+1,1)&"."&MID(A1,FIND(" ",A1,FIND("
",A1,1)+1)+1,1)


--
Regards,

OssieMac


"thyagu" wrote:

Hi, I want Initials of name in excel. Like in A1, I have
1) Lloyd L. Summers
2) Lloyd L Summers
I want L.L.S. in B1. Can I do that. Is there any formula?
if yes Then pls tell me.

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default in excel how to get initial from name

Hi OssieMac, Thanks for answering my questions. it is very helpful to me.
thankyou

with regards
thyagarajan
"OssieMac" wrote:

Insert the following formula in B1.

Note it is one line even if it breaks in this post.

=LEFT(A1,1)&"."&MID(A1,FIND(" ",A1,1)+1,1)&"."&MID(A1,FIND(" ",A1,FIND("
",A1,1)+1)+1,1)


--
Regards,

OssieMac


"thyagu" wrote:

Hi, I want Initials of name in excel. Like in A1, I have
1) Lloyd L. Summers
2) Lloyd L Summers
I want L.L.S. in B1. Can I do that. Is there any formula?
if yes Then pls tell me.

  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,346
Default in excel how to get initial from name

Hi,

Just two points,
1. You can shorten the first argument, and 2 of the FIND's
2. The answer is not complete - the period at the end is missing

=LEFT(A1)&"."&MID(A1,FIND(" ",A1)+1,1)&"."&MID(A1,FIND(" ",A1,FIND("
",A1)+1)+1,1)&"."


--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"thyagu" wrote:

Hi OssieMac, Thanks for answering my questions. it is very helpful to me.
thankyou

with regards
thyagarajan
"OssieMac" wrote:

Insert the following formula in B1.

Note it is one line even if it breaks in this post.

=LEFT(A1,1)&"."&MID(A1,FIND(" ",A1,1)+1,1)&"."&MID(A1,FIND(" ",A1,FIND("
",A1,1)+1)+1,1)


--
Regards,

OssieMac


"thyagu" wrote:

Hi, I want Initials of name in excel. Like in A1, I have
1) Lloyd L. Summers
2) Lloyd L Summers
I want L.L.S. in B1. Can I do that. Is there any formula?
if yes Then pls tell me.



  #6   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default in excel how to get initial from name

Just a point to consider, thyagu ..

Should you have source names
which have only a single space or more than 2 spaces, eg:

Max Sommers
Peter G. Osgood Walthers

then the formula solution(s) provided would not suffice. You can test this
easily. Ron's UDF, as per my response will return correct results right
through.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,000 Files:370 Subscribers:66
xdemechanik
---
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
excel calls a worksheet that has initial row consisting of labels chava New Users to Excel 2 September 4th 07 08:07 PM
How do I set initial Excel workbook name? John Brock Excel Discussion (Misc queries) 10 February 16th 07 05:26 PM
How can I have an initial zero in an Excel cell? ALupin Excel Discussion (Misc queries) 4 November 11th 06 10:16 AM
Format fonts (ie, initial cap) in Excel like you can in Word. gojackets1979 Excel Discussion (Misc queries) 1 October 14th 05 12:20 AM
Remove middle initial from "first name middle initial" Justin F. Excel Discussion (Misc queries) 15 September 26th 05 06:13 PM


All times are GMT +1. The time now is 03:26 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"