Create Acronym (Extract first letter of each word)
Cool Shane, and it works well in XL97 too............
Vaya con Dios,
Chuck, CABGx3
"ShaneDevenshire" wrote:
The following macro will place the result in the cell to the right of the
cell you are testing.
Sub Shorten()
Dim T As Range, I As Integer, myWord As String
E = ActiveCell
myWord = Left(E, 1)
For I = 2 To Len(ActiveCell.Value)
If Mid(E, I, 1) = " " Then
myWord = myWord & Mid(E, I + 1, 1)
End If
Next I
ActiveCell.Offset(0, 1) = myWord
End Sub
--
Chees,
Shane Devenshire
"VB_Sam" wrote:
How can I extract first letter of each word in Excel XP?
For example:
I am a boy
You are a girl
Using the pseudo-function called acronym(), the result will become:
IAAB
YAAG
I'm using Excel XP.
Is there any function which can do it?
If not, could anyone provide a macro for me?
(I'm only a beginner in macro)
Thanks.
|