Excel Formula To Create Abbreviations Using First Letters Of Text
I'm looking for an excel formula that will help me create abbreviations using the first letters of the text in columns -
TEXT ------------------------- ---+------ABBREVIATION
Stanford School of Engineering | SSE
Wollongong University Dubai | WUD
and so on.
Note that the abbreviation excluded the 'of' while creating abbreviation. I'm aware that this can be done by using macros; and have already tried the following code which doesn't work (I keep getting error):
TEXT ------------------------- ---+------ABBREVIATION
Stanford School of Engineering | SSE
Wollongong University Dubai | WUD
and so on.
Note that the abbreviation excluded the 'of' while creating abbreviation. I'm aware that this can be done by using macros; and have already tried the following code which doesn't work (I keep getting error):
Function GetInitials(ByVal s As String) As String Dim sExclude As String sExclude = "the|for|a|an|of" ' words to exclude With CreateObject("VBScript.RegExp") .Global = True .IgnoreCase = True .Pattern = "\b(" & sExclude & ")\b" s = .Replace(s, "") .Pattern = "\s*([a-z])[a-z]+\s*" GetInitials = UCase(.Replace(s, "$1")) End With End FunctionI've absolutely no experience with Macros and vB scripting. Would appreciate if anyone can help.
0