Convert Full name in Intials

  • Thread starter Thread starter K
  • Start date Start date
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
 
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
 
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).
 
Back
Top