Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default Removing Of/And/The from Acronym Function

Someone kindly provided me with:

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

Which worked great but didn't ignore The/And/Of if capped. So I found some
code that should have worked

If Not (UCase(TmpStr) = "OF") And Not (UCase(TmpStr) = "FOR") And Not
(UCase(prom) = "THE") And _
Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") And Not
(UCase(prom) = "ON") Then

and of course added another
End If

But I get value errors.

Any thoughts appreciated.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Acronym (Extract first letter of each word) VB_Sam Excel Worksheet Functions 20 April 24th 23 09:05 PM
Acronym Function? msnyc07 Excel Worksheet Functions 2 March 11th 10 09:15 PM
ACRONYM OF CAPS ONLY FARAZ QURESHI Excel Discussion (Misc queries) 3 February 23rd 09 09:58 AM
How do I count a named range for a specific word or acronym? brandyb Excel Worksheet Functions 1 November 4th 05 07:50 PM
Removing a FIXED Function Amy Sandlin Excel Worksheet Functions 1 October 11th 05 07:52 PM


All times are GMT +1. The time now is 03:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"