English

How To: Convert a string to proper case in the ArcMap Field Calculator

Summary

Warning:
The procedure below is for ArcGIS 9.3.1 or earlier versions. Starting at ArcGIS 10.0, expressions in the Field Calculator are created using only VBScript or a standard Python format.
Instructions provided describe how to use the ArcMap Field Calculator to convert an upper case, lower case or mixed case string to proper case. For example, a string that is in the following formats:
  • "hello world"
  • "HELLO WORLD"
  • "hELLO wORLD"
The VBA function "StrConv" converts the string to: "Hello World".
For information on how to do the equivalent steps in a label expression, please see the link in the Related Information section below.

Procedure

  1. Add a new text field to the attribute table to store the new string values.
    1. If in editing mode, stop the current editing session.
    2. Open the feature's attribute table.
    3. Click Options.
    4. Click Add Field.
    5. Name the field.
    6. Type: Text.
    7. Set the Length property.
  2. Open the ArcMap Field Calculator for the field created in the step above by right-clicking the new field name heading in the Table View and click Calculate Values.
  3. In the Field Calculator dialog box, type the following code in the text box under "Your Field Name = "
    Code:
    StrConv([Existing Field], vbProperCase)
    Change [Existing Field] to match the name of the existing field that contains the string values that are not currently in the proper case.
  4. Click OK in the Field Calculator dialog box.

Related Information