Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 75
Default PICK UP FIRST CHARACTER OF WORD

In one column name of the companies are appearing but the lenght or number of
words in the name of company is unlimited. I would like to pick up first
character of each word (first character after the space). e.g. if number of
words in the name can consist of 25 words, in that case 25 first character
should be picked.

How to do that .... pl. help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default PICK UP FIRST CHARACTER OF WORD

Difficult to do with native functions.
Here is a User Defined Function that works.

Function acronym(mycell)
temp = Left(mycell, 1)
For j = 1 To Len(mycell)
If Mid(mycell, j, 1) = " " Then
mynext = Mid(mycell, j + 1, 1)
temp = temp & mynext
End If
Next j
acronym = UCase(temp)
End Function


Change last but one line to: acronym = temp if you do not want caps.
Unsure of how to use a User Defined Function? see
David McRitchie's site on "getting started" with VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Vijay Kotian" wrote in message
...
In one column name of the companies are appearing but the lenght or number
of
words in the name of company is unlimited. I would like to pick up first
character of each word (first character after the space). e.g. if number
of
words in the name can consist of 25 words, in that case 25 first character
should be picked.

How to do that .... pl. help.



Reply
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
Create a Word Table from a Excel Macro Silvia Excel Discussion (Misc queries) 0 September 7th 06 12:34 AM
How can I paste 429 character Excel cell in MS Word ? Marie-Luisa Excel Discussion (Misc queries) 1 July 20th 06 02:27 PM
merging documents,exporting long landscape table to word with page breaks & numbers guillemot Excel Discussion (Misc queries) 4 February 6th 06 08:57 AM
Formula for Displaying the First Character of a word savbci Excel Discussion (Misc queries) 4 February 1st 06 09:11 PM
Sending from excel to word template pizdus Excel Discussion (Misc queries) 0 January 17th 06 05:57 PM


All times are GMT +1. The time now is 10:57 AM.

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

About Us

"It's about Microsoft Excel"