Show Text in a Pivot Table Values Area

A common question is “How can I show text in a pivot table’s values area, instead of numbers?”

For example, if you add the Region field to the Values area, you’d like to see the region’s name, instead of a Count Of Region number.

PivotTextVal01

If you use Crosstab queries in Microsoft Access, you might have achieved this by using the First or Last summary function, instead of Sum or Count.

Unfortunately, the First and Last functions aren’t available in Excel pivot tables, so there’s no easy way to show text in the Values area.

Workaround #1 – Use the Row Fields

You could add the Region field to the Row Labels area, with the City field. Then add another field in the Values area to show a count of the regions. The layout won’t be exactly what you wanted, but it will show the region name.

PivotTextVal02

Workaround #2 – Create a Custom Number Format

In this example, there are only two region names, so you could use a custom number format to show the region names. You’ll assign a number to each region, then use that number in the pivot table. Note: This technique is limited to 2 items.

Create the Region Number field:

  1. In the source data, add a new column with the heading RegNum. In this column, type a 1 for East region orders and 2 for North region orders.
  2. Refresh the pivot table, so the RegNum appears in the Field List.
  3. Add the RegNum field to the Values area, and right-click on one of the numbers.
  4. In the popup menu, click summarize by Max.

PivotTextVal03

Apply a Custom Number Format:

  1. Right-click a Region value in the Values area in the pivot table.
  2. In the popup menu, click Number Format.
  3. In the Category list, click Custom.
  4. In the Type box, enter [=1]”East”;[=2]”North”;General
  5. Click OK, to close the dialog box.

PivotTextVal04

The pivot table will show the Region names, instead of the Region numbers.

PivotTextVal05

____________

25 thoughts on “Show Text in a Pivot Table Values Area”

  1. Debra,

    last year I published a workaround for creating cross tabular views with texts in the value area. Not an Excel Pivot Table, but a VBA routine generating a cross-tab, looking like a Pivot Table (well, more or less). It is not too complicated to implement, even if someone is not familiar with VBA.

    You can find the article and the Excel workbook for free download here:

    Emulate Excel Pivot Tables with Texts in the Value Area using VBA

    After reading your article and the comments here, I thought some of your readers might be interested.

    Best regards

    Robert

  2. Hi there,

    Just noticed that the solution with the custom formatting also works for CONDITIONAL FORMATTING. This way there do not seem to be limitations as to the number of possible variables (Code 1: for “North” [=1], “South”[=2] code 2 for “East”[=3],”West”[=4]etc.). I’ve got Office 2007 on my computer and it works.

    Kr
    Luke

  3. Luke – Thx – how do you get the CONDITIOANL FORMATTING to remain after you update the table – I loose my formats they return to the prior format?

  4. It method doesn’t seem to work if ‘1’ and the ‘2’ is formuled.

    e.g. In my newly created column in the datasource, I have the formula =if(A1<50,"1","2")

    How can I get around this please without having to manually enter in the 1's and 2's?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.