If you work with ArcMap, you know how to turn on dynamic labels for a layer and display the value from a specified attribute field for each feature in the layer. What if you want to label each feature with more than one attribute? You can easily do this by creating a label class.

Suppose you want to label a group of counties with their name and population. You have a counties layer that includes both attributes.

  • Add your county data to a new map document and symbolize the layer as desired.
  • Display the Labeling toolbar by clicking View > Toolbars > Labeling.
  • On the Labeling toolbar, click the Label Manager button.

Labeling toolbar

  • In the Label Manager dialog box, check the box next to Counties and click the layer name to select it.
    • Currently, the layer has one label class named Default. Every layer has a Default label class, which uses the primary display field for labeling by default. You can choose a different label field in this dialog box or in the Layer Properties dialog box.
  • On the right, enter a name for a new label class, then click Add.
    • For this example, we'll create a label class called NamePop that will display values from two fields: a field that stores county names and a field that stores county population.
  • On the left, check the box next to the new label class and select it, then choose a font, size, color, and other basic formatting options for the label text as desired. For this example, we'll choose the Calibri font, size 11, with a dark blue color. We could also set label placement properties now, but for this example we don't need to.
  • Uncheck the Default label class to turn it off.

Click to enlarge

  • Click Expression to open the Label Expression dialog box.

This dialog box provides various options. You can use VBScript or JScript to create custom label text and formatting. VBScript is the default.

  • In the list of fields, double-click COUNTY to add it to the expression box below. This field stores the county names.
  • Next, click in the expression next to [COUNTY] and type an ampersand (&).

In VBScript, the ampersand is used as a connector.

  • Double-click the POP2000 field. The expression now looks like this.

Label expression

  • Click OK, then Apply and you see the result on the map.

Click to enlarge 

Values from both attribute fields display in each county polygon, but the formatting is not what you want. Some simple coding can greatly enhance the labels. Suppose you want the population values to display below the county names.

  • Back in the Label Manager, with the new label class still selected, click Expression.

In the Label Expression dialog box, you will edit the expression to add the word "County" after the county name, and you will put the population value on a new line preceded by the word "Population: ". In VBScript, text must be surrounded by double quotes. Note that spaces are also included in the double quotes. To add a new line, you can use the vbNewLine function. As you build the expression, each individual piece of the expression is preceded by an ampersand.

Label expression

  • Click OK, then Apply and look at the map. This time, the labels look much nicer.

Click to enlarge

If you wanted, you could use the Label Expression dialog box to add more VBScript and formatting tags to refine the labels further. For example, you could display the county names in a different color (perhaps light gray?), you could adjust the character spacing, and you could display the population values in a smaller font and add commas to indicate thousands in the numeric values. After all that work, you could save your label expression to a file, which could be loaded into other maps.

But if you don't care to muddle around trying to figure out how to get the effects you want using VBScript, an alternative is to convert the labels to annotation.

  • Close the Label Manager. 
  • Right-click the Counties layer in the Table of Contents and choose Convert Labels to Annotation.
  • In the Convert Labels to Annotation dialog box, choose to store the annotation in a geodatabase, verify that the correct geodatabase is in the output path, then click OK.
  • After the annotation feature class is added to the Table of Contents, start an edit session, select the annotation features, and open the Attributes dialog box.
    • Now you can quickly edit the font color and size for the annotation features using the buttons on the Annotation tab. You can change the character spacing for all the annotation features at once in the Attributes tab.
  • Click Apply and save your edits when you are finished.

Click to enlarge

Because it is stored in a geodatabase, an annotation feature class is available for use in other maps. A big advantage to using annotation is that you can reposition it on the map as needed.

Tip: To quickly display commas in a numeric data field that you want to use for labels:

  • Open the layer attribute table, right-click the field, and choose Properties.
  • In the Field Properties dialog box, click the ellipsis button next to Numeric.
  • In the Number Format dialog box, check the box next to "Show thousands separators."
  • Click OK to close the open dialog boxes.

Voila! your data now has commas, which makes for easier reading on labeled features.

You Try It: Download the attached personal geodatabase (note that it is version 9.3) and follow the instructions above to label the counties as shown. If you don't have ArcGIS 9.3, try the steps on your own data.