How To: Capitalize the first letter of a text or string field


Instructions provided describe how to use the Field Calculator in ArcMap to capitalize the first letter of all the values of a text or string field in the Attribute Table.


Follow the steps below.

The procedure described below is for Version 9.3x and earlier.

  1. In ArcMap, open the Attribute Table of a layer.
  2. Right-click on a field heading of a text field > Calculate Values ...

    Optionally, create a new text field for the result by first clicking Options > Add Field.

  3. Click, when the Field Calculator appears, the Advanced checkbox.
  4. Paste the following code in the Pre Logic VBA Script Code box.

    Dim sUpperC As String
    sUpperC = LEFT( [FIELD_NAME], 1)

    Dim sLowerC As String
    sLowerC = RIGHT( [FIELD_NAME], LEN( [FIELD_NAME]) - 1)

    Dim Output As String
    Output = UCASE(sUpperC) & sLowerC

  5. Change [FIELD_NAME] to the actual name of the field in which you want to capitalize the first letter.
  6. Type the word 'Output' in the box below the code.
  7. Click OK.