Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default In excel, how do we pull the first letter from words in a sentence

I need to assign codes to words for e.g. Product Master would need a code
like "PM"
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 211
Default In excel, how do we pull the first letter from words in a sentence

Not sure exactly about your question, but in Excel with "Left" command you
can choose any number of characters from beginning of a sentence.
With combination of "Left" and "Middle" and the space between words in a
sentence you can pull out the first char. of words in a sentence.

"Deepak" wrote:

I need to assign codes to words for e.g. Product Master would need a code
like "PM"

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default In excel, how do we pull the first letter from words in a sentence

"Deepak" wrote:
I need to assign codes to words for e.g.
Product Master would need a code like "PM"


One way is to install & use the UDF FrstLtrs below by Ron Rosenfeld ..
(UDF = user defined function)

To install the UDF:
Press Alt+F11 to go to VBE
Copy n paste the UDF into the code window (whitespace on right)
Press Alt+Q to get back to Excel

In Excel,
Assuming your data in A1 down, eg: Product Master,
put in B1: =frstltrs(A1)
which returns: PM
Copy B1 down to extract the desired results

'--------
Function FrstLtrs(str As String) As String
Dim temp
Dim i As Long

temp = Split(Trim(str))

For i = 0 To UBound(temp)
FrstLtrs = FrstLtrs & Left(temp(i), 1)
Next i

End Function
'-------

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 69
Default In excel, how do we pull the first letter from words in a sentence

Deepakji ,

Suppose your data is in A1 cell then put following formula in cell B1,

=MID(A1,1,1)&MID(A1,FIND(" ",A1)+1,1)

Regards

H S Shastri

================================================== ===


"Deepak" wrote:

I need to assign codes to words for e.g. Product Master would need a code
like "PM"

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default In excel, how do we pull the first letter from words in a sentence

On Sun, 1 Feb 2009 22:00:05 -0800, Deepak
wrote:

I need to assign codes to words for e.g. Product Master would need a code
like "PM"


If you happen to have Longre's free morefunc.xll add-in installed, then you
could use:

=MCONCAT(REGEX.MID(A1,"\b\w",INTVECTOR(WORDCOUNT(A 1),1)))

See http://xcell05.free.fr/morefunc/english/index.htm or Google if the site is
not up
--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 211
Default In excel, how do we pull the first letter from words in a sent

This will return only first 2 letters. Amendment is necessary to work for
more than 2 words.

"HARSHAWARDHAN. S .SHASTRI" wrote:

Deepakji ,

Suppose your data is in A1 cell then put following formula in cell B1,

=MID(A1,1,1)&MID(A1,FIND(" ",A1)+1,1)

Regards

H S Shastri

================================================== ===


"Deepak" wrote:

I need to assign codes to words for e.g. Product Master would need a code
like "PM"

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default In excel, how do we pull the first letter from words in a sentence

Missing line earlier, to insert module:
...
Press Alt+F11 to go to VBE
Click Insert Module
Copy n paste the UDF into the code window (whitespace on right)

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default In excel, how do we pull the first letter from words in a sent

Dear Ron

I think it was you who put me on to Longre's moregfunc in the first place,
and your reference to it on this thread is the most recent on this forum, so
I hoped that here would be an appropriate place to put my question. I think
Longre's MCONCAT is great and it is the centre of a major spreadsheet I am
working on.

Overnight (literally last night Western Australian time - Tue 3rd Feb 2008)
- my Excel installation has ceased to allow it be part of it. I have
uninstalled and reinstalled morefunc. I have rebooted. I have downloaded a
new copyfrom CNet. All to no avail.

Unfortunately all I get, when trying to use the home site for morefunc, is
lots of errors.

If you have any ideas for what might be going on, or what settings I could
check on Windows / Excel / Norton, I would be most grateful.

Best regards

Philip Hunt
Medina, Kwinana
Perth, Western Australia
--
Graewood Business Services, Kwinana, Perth, Western Australia


"Ron Rosenfeld" wrote:

On Sun, 1 Feb 2009 22:00:05 -0800, Deepak
wrote:

I need to assign codes to words for e.g. Product Master would need a code
like "PM"


If you happen to have Longre's free morefunc.xll add-in installed, then you
could use:

=MCONCAT(REGEX.MID(A1,"\b\w",INTVECTOR(WORDCOUNT(A 1),1)))

See http://xcell05.free.fr/morefunc/english/index.htm or Google if the site is
not up
--ron

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
Capitalize only first letter in sentence ChrisHT Excel Worksheet Functions 1 December 2nd 08 09:57 PM
Capitalize first letter in sentence Lightjag Excel Worksheet Functions 13 January 15th 08 02:25 PM
Not all words in sentence prints - row is set autofit HELP? Marita Excel Worksheet Functions 0 January 14th 08 09:28 PM
how do I create random blocks of letter and words in excel? pencean Excel Worksheet Functions 1 January 19th 07 12:08 AM
Sentence with first letter in Capital, rest all in small. Shrikant Excel Discussion (Misc queries) 3 September 1st 05 11:23 AM


All times are GMT +1. The time now is 12:35 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"