i want an easy formula that can change name like this..
Ragavendra - R
Abdul Hasaad - A H
Mohamad Nasrin Sharma - M N S
Abdul Hamed Ibrahim Kaboor - A H I K
Please make very easy formula to do this excel operation...
Thanks in advance...
i want an easy formula that can change name like this..
Ragavendra - R
Abdul Hasaad - A H
Mohamad Nasrin Sharma - M N S
Abdul Hamed Ibrahim Kaboor - A H I K
Please make very easy formula to do this excel operation...
Thanks in advance...
Last edited by question.maker; 03-11-2013 at 04:00 PM.
If your text is in A1, then in A2 type
Formula:
=LEFT(A1,1)&" " & IF(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))>0,MID(A1,FIND(" ",A1)+1,1),"")&" " & IF(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))>1,MID(A1,FIND(" ",A1,FIND(" ",A1)+
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
Oops i just realised that though mine works for the 1st one, it doesnt for the 2nd example. Will work it out or someone with a better solution will come forth.
Found this myslef not so long ago, only works for first three initials though. Still learning text manipulation so not sure how to modify this yet untill I fully understand how it all works.
EDIT: Beaten to it! Ignore this post![]()
=UPPER(LEFT(A1,1)&" "&MID(A1,FIND(" ",A1,1)+1,1)&" "&IF(ISERROR(FIND(" ",A1,FIND(" ",A1,1)+1)),"",MID(A1,FIND(" ",A1,FIND(" ",A1,1)+1)+1,1)))
Say thanks, click *
Extremely messy I know but this will work out up to 4 initials. It finds modifies the text by removing the left most name each time hence the length of the formula.![]()
=LEFT(A1,1)&IFERROR(" "&LEFT(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)),1),"")&IFERROR(" "&LEFT(RIGHT(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)),LEN(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)))-FIND(" ",RIGHT(A1,LEN(A1)-FIND(" ",A1,1)))),1),"")&IFERROR(" "&LEFT(RIGHT(RIGHT(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)),LEN(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)))-FIND(" ",RIGHT(A1,LEN(A1)-FIND(" ",A1,1)))),LEN(RIGHT(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)),LEN(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)))-FIND(" ",RIGHT(A1,LEN(A1)-FIND(" ",A1,1)))))-FIND(" ",RIGHT(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)),LEN(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)))-FIND(" ",RIGHT(A1,LEN(A1)-FIND(" ",A1,1)))))),1),"")
EDIT: Wrap this in UPPER to ensure result is in capitals (if you need this to be the case):
=UPPER("above formula")
Last edited by Harribone; 03-11-2013 at 04:14 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks