Convert Full name in Intials

K

K

I have names in column A like (see below)

John Ali
Sue Gore
etc………

I need some kind of formula in column B or macro which should convert
these names in intials. So I want result in column B like (see below)

JA
SG
etc……….

Please can any friend can help
 
G

Gary Keramidas

give this a try

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

--

Gary Keramidas
Excel 2003


I have names in column A like (see below)

John Ali
Sue Gore
etc………

I need some kind of formula in column B or macro which should convert
these names in intials. So I want result in column B like (see below)

JA
SG
etc……….

Please can any friend can help
 
P

Patrick Molloy

here's a UDF to do this.

paste the code into a standard module ( ALT+F11 then Insert/Module)

then if your name is in A1 , in another cell type
=nameSplitter(A1)

Option Explicit

Function NameSplitter(text As String) As String
Dim names As Variant
Dim i As Long
names = Split(text, " ")
For i = LBound(names, 1) To UBound(names, 1)
NameSplitter = NameSplitter & Left(names(i), 1)
Next
End Function


how it works. the text is split into an array by the SPLIT() function, using
the space as the item deliminator. Names is a variant which SPLIT()
populates. we read each block of text, taking the first letter only (using
the LEFT() string function, and concatenate these for each of the items in
Names).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top