Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Capitalize only first letter in sentence | Excel Worksheet Functions | |||
Capitalize first letter in sentence | Excel Worksheet Functions | |||
Not all words in sentence prints - row is set autofit HELP? | Excel Worksheet Functions | |||
how do I create random blocks of letter and words in excel? | Excel Worksheet Functions | |||
Sentence with first letter in Capital, rest all in small. | Excel Discussion (Misc queries) |