Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Acronym Function?
Is there anyway to generate an acronym on cell contents with a function?
Ideally I could ignore certain words e.g. of, the, and, etc. and then for the first letter of each word generate an acronym e.g. United States of America = USA |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Acronym Function?
Hi,
Try this UDF which extracts the first capital of each word Function FrstLtrs(MyStr As String) As String Dim temp Dim i As Long TmpStr = Split(Trim(MyStr)) For i = 0 To UBound(TmpStr) If Asc(Left(TmpStr(i), 1)) = 65 And _ Asc(Left(TmpStr(i), 1)) <= 90 Then FrstLtrs = FrstLtrs & Left(TmpStr(i), 1) End If Next End Function -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "msnyc07" wrote: Is there anyway to generate an acronym on cell contents with a function? Ideally I could ignore certain words e.g. of, the, and, etc. and then for the first letter of each word generate an acronym e.g. United States of America = USA |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Acronym Function?
Awesome, thanks so much!
"Mike H" wrote: Hi, Try this UDF which extracts the first capital of each word Function FrstLtrs(MyStr As String) As String Dim temp Dim i As Long TmpStr = Split(Trim(MyStr)) For i = 0 To UBound(TmpStr) If Asc(Left(TmpStr(i), 1)) = 65 And _ Asc(Left(TmpStr(i), 1)) <= 90 Then FrstLtrs = FrstLtrs & Left(TmpStr(i), 1) End If Next End Function -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "msnyc07" wrote: Is there anyway to generate an acronym on cell contents with a function? Ideally I could ignore certain words e.g. of, the, and, etc. and then for the first letter of each word generate an acronym e.g. United States of America = USA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create Acronym (Extract first letter of each word) | Excel Worksheet Functions | |||
ACRONYM OF CAPS ONLY | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
How do I count a named range for a specific word or acronym? | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions |