Solved

Excel PROPER Exclusions

Posted on 2014-11-17
4
122 Views
Last Modified: 2014-12-11
I would like the ability to exclude or ignore certain suffixes or phrases from the PROPER function.  For example, if I apply this function to WILSON III, it will be converted to Wilson Iii.  Obviously, in this situation, I would like to exclude the suffix.  Is this possible?
0
Comment
Question by:amergts
4 Comments
 
LVL 23

Expert Comment

by:Michael74
ID: 40448964
The only way I could see to do this would be create a list of exceptions and then use a formula to look up if the exception applies. In reality this would be almost impossible to implement as the number exceptions would be huge. Personally I think it would be easier to correct these manually or ignore them.
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 40451145
You'll need code for this.  This function will cover you with the suffixes for III - X:

Function BetterProper(InputString As String) As String
    
    Dim arr As Variant
    Dim Counter As Long
    
    arr = Split(InputString, " ")
    
    For Counter = LBound(arr) To UBound(arr)
        If Counter <> UBound(arr) Then
            arr(Counter) = Application.Proper(arr(Counter))
        Else
            Select Case arr(Counter)
                Case "III", "IV", "V", "VI", "VII", "VIII", "IX", "X"
                    ' do nothing
                Case Else
                    arr(Counter) = Application.Proper(arr(Counter))
            End Select
        End If
    Next
    
    BetterProper = Join(arr, " ")
    
End Function

Open in new window

0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 40494430
I've requested that this question be closed as follows:

Accepted answer: 250 points for Patrick Matthews's comment #a40451145
Assisted answer: 250 points for Michael74's comment #a40448964

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Lately there has been a variety of news related to U.S. employment.  Stories about worker productivity, automobile and airline unions, low employment and foreign laborers have frequented the news.  Each story has good and bad attributes we might arg…
Meetings to discuss business process can waste time, and often do .  The meeting's dialog can get confusing when participants have different professional perspectives and backgrounds.  A jointly-developed process picture helps wade through the confu…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now