Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I need the formula for alpha code for example the woord First National Bank
code is FNB now what's the code or formula you put in to change that to that. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
What do mean by "alpha code"?
Do want to select first character of each word to make an abbreviation? And would this always be the case? "Tania" wrote: I need the formula for alpha code for example the woord First National Bank code is FNB now what's the code or formula you put in to change that to that. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yes i want to select the first character of each word to make an abbreviation?
"Toppers" wrote: What do mean by "alpha code"? Do want to select first character of each word to make an abbreviation? And would this always be the case? "Tania" wrote: I need the formula for alpha code for example the woord First National Bank code is FNB now what's the code or formula you put in to change that to that. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
try this UDF:
Look here for info on Visual Basic Editor: http://www.cpearson.com/excel/vbe.htm Function GetInitials(ByRef intext As Range) As String mytext = intext.Value initials = Left(mytext, 1) ist = 1 Do n = InStr(ist, mytext, " ") If n = 0 Then GetInitials = initials Exit Function End If mytext = Mid(mytext, n + 1, 255) initials = initials + Left(mytext, 1) Loop End Function with data in A!; in B1: =GetInitials(A1) "Tania" wrote: Yes i want to select the first character of each word to make an abbreviation? "Toppers" wrote: What do mean by "alpha code"? Do want to select first character of each word to make an abbreviation? And would this always be the case? "Tania" wrote: I need the formula for alpha code for example the woord First National Bank code is FNB now what's the code or formula you put in to change that to that. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Thu, 23 Aug 2007 03:46:19 -0700, Tania
wrote: I need the formula for alpha code for example the woord First National Bank code is FNB now what's the code or formula you put in to change that to that. The following should return the first alpha-numeric character of each word in a string, all capitalized. First enter the UDF below. To do that, <alt-F11 opens the VB Editor. Ensure your project is highlighted in the Project Explorer window, then Insert/Module and paste the code below into the window that opens. Then use this formula: =UPPER(recode(A1,"(\w).*?(\s|$)","$1")) Substitute your cell_reference for A1. =============================== Option Explicit Function ReCode(str As String, sPtrn As String, sRepl As String) As String Dim re As Object Set re = CreateObject("vbscript.regexp") re.Global = True re.Pattern = sPtrn ReCode = re.Replace(str, sRepl) End Function ================================= --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formula to add Alpha? | Excel Worksheet Functions | |||
Using a cell w/Alpha numeric characters in mulplication formula | Excel Worksheet Functions | |||
convert numbers to alpha code | Excel Discussion (Misc queries) | |||
What is the formula to average alpha? | Excel Worksheet Functions | |||
The colums changed from alpha to numeric how do you make it alpha | Excel Discussion (Misc queries) |