Convert Full name in Intials
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 |
Convert Full name in Intials
give this a try
=LEFT(A1,1) &MID(A1,FIND(" ",A1)+1,1) -- Gary Keramidas Excel 2003 "K" wrote in message ... 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 |
Convert Full name in Intials
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). "K" wrote in message ... 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 |
All times are GMT +1. The time now is 11:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com