Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Mon, 23 Feb 2009 00:08:03 -0800, FARAZ QURESHI
wrote: I want 2 develop a UDF like Acro, which would return the acronymn of only the letter in Caps. For example =ACRO(A1) when A1 is: "United States of America" would return: USA and NOT: USOA To enter this User Defined Function (UDF), <alt-F11 opens the Visual Basic Editor. Ensure your project is highlighted in the Project Explorer window. Then, from the top menu, select Insert/Module and paste the code below into the window that opens. To use this User Defined Function (UDF), enter a formula like =ACRO(A1) in some cell. ================================ Option Explicit Option Compare Binary Function ACRO(str As String) As String Dim i As Long Dim sTemp As String For i = 1 To Len(str) sTemp = Mid(str, i, 1) If sTemp Like "[A-Z]" Then ACRO = ACRO & sTemp End If Next i End Function ========================= --ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create Acronym (Extract first letter of each word) | Excel Worksheet Functions | |||
fix all caps text to first letter caps | Excel Discussion (Misc queries) | |||
How do I count a named range for a specific word or acronym? | Excel Worksheet Functions | |||
How can I convert all Caps to first letter caps in Excel? | Excel Worksheet Functions | |||
excel sheet all caps and needs to be only the first letter caps.. | Excel Discussion (Misc queries) |