LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Create Acronym (Extract first letter of each word)

Hi,

The following modification of my previous macro will allow you to select a
column of item and it will put the results in the column to the right for all
the selected cells.

Sub Shorten()
Dim T As Range, I As Integer, myWord As String
For Each cell In Selection
E = cell
myWord = Left(E, 1)
For I = 2 To Len(cell)
If Mid(E, I, 1) = " " Then
myWord = myWord & Mid(E, I + 1, 1)
End If
Next I
cell.Offset(0, 1) = myWord
Next cell
End Sub

--
Cheers,
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.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
display one letter of a word in a cell r_chaud Excel Worksheet Functions 2 December 4th 07 09:39 PM
Insert letter/no among word ShamsulZ Excel Discussion (Misc queries) 2 October 5th 06 10:39 AM
Default Capital letter for 1st letter of a word Jeff Excel Discussion (Misc queries) 6 July 10th 06 08:36 AM
How do I count a named range for a specific word or acronym? brandyb Excel Worksheet Functions 1 November 4th 05 07:50 PM
How do I get the first letter of a word in excel Shadowofthedarkgod Excel Discussion (Misc queries) 8 May 31st 05 02:56 AM


All times are GMT +1. The time now is 09:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"