View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default rearranging_names

I do note, however, that with properly entered data, the trailing "dot" is
missing from those names with initials. So you should use this formula
instead of the one I originally posted...

=MID(A1&"."&A1,LEN(A1)-LEN(TRIM(RIGHT(SUBSTITUTE(A1,".",
REPT(" ",99)),99)))+1,LEN(A1)+(NOT(ISERR(FIND(".",A1) ))))

--
Rick (MVP - Excel)



"Rick Rothstein" wrote in message
...
I cannot consistently get the output you are showing. If I remove the
"+1", I can get some of them, if I add spaces to your entries, I can get
other, but I can't seem to duplicate what you show. My suggestion is to
first make sure your entries don't have leading or trailing "invisible"
characters (such as the space character or the ASCII 160 non-breaking
space character). Next, make sure you are using the *exact* formula I
posted (copy/paste it, don't re-type it). Then let us know whether it is
working for you or not. Note that I tested the formula on the sample data
you posted and it does work.

--
Rick (MVP - Excel)



"via135" wrote in message
...
On Apr 3, 10:55 pm, "Rick Rothstein"
wrote:
You can use this formula to reverse the initials and surnames...

=MID(A1&"."&A1,LEN(A1)-LEN(TRIM(RIGHT(SUBSTITUTE(A1,".",REPT("
",99)),99)))+1,LEN(A1))

--
Rick (MVP - Excel)

"via135" wrote in message

...

hi all!

i am having names in COL -A
all begining with intials followed by the name
and some names without initials as under:

M.GUPTA
C.K.S.BANERJEE
RAMAN
M.M.K.S.MOHAN
L.T.PRABA
S.LAL

and so on..!

what i want is to rearrange
the names to begin with the name
followed by initials..like

GUPTA.M.
BANERJEE.C.K.S.
RAMAN
MOHAN.M.M.K.S.
PRABA.L.T.
LAL.S.

so that it would be easier for
sorting the names..!
any help please?

-via135


hi Rothstein.!

i am getting the results like....

.GUPTA.
.S.BANERJEE.C.
RAMAN
K.S.MOHAN.M.M
T.PRABA.L
.LAL.