# Proper case label expression

261
2
08-13-2012 01:28 PM
Occasional Contributor III
Hello,

I am trying to convert all caps to proper case with more than one word in the field. For example the text in the field is "IRONWOOD RIDGE DR" and I want it to display as "Ironwood Ridge Dr".  The example expression at
http://resources.arcgis.com/en/help/main/10.1/index.html#//00s800000027000000 capitalizes the first word and lowercase for all other words so I end up with "Ironwood ridge dr". Any help would be appreciated.

Thanks!
Tags (2)
1 Solution

Accepted Solutions
Occasional Contributor III
Thanks for the help but in the meantime I found the code in the help dialog button that was perfect (who would think to look there - it has been a long Monday) :):

`  Function FindLabel([Name])     var = [Name]    splitStr = Split(var, chr(32))    for i = 0 to UBound(splitStr)       tmpStr = Trim(splitStr(i))        if len(tmpStr) > 0 then tmpStr = UCase(Left(tmpStr,1)) & LCase(Right(tmpStr, Len(tmpStr) -1))    splitStr(i) = tmpStr    next    ProperCase = join(splitStr, " ")    FindLabel = ProperCase    End Function`
2 Replies
Frequent Contributor
Tanya,

Have a look at this post:

`  Function FindLabel([Name])     var = [Name]    splitStr = Split(var, chr(32))    for i = 0 to UBound(splitStr)       tmpStr = Trim(splitStr(i))        if len(tmpStr) > 0 then tmpStr = UCase(Left(tmpStr,1)) & LCase(Right(tmpStr, Len(tmpStr) -1))    splitStr(i) = tmpStr    next    ProperCase = join(splitStr, " ")    FindLabel = ProperCase    End Function`