0
votes

I have a data table, and this corresponding pivot table:

http://i.stack.imgur.com/ExzBX.png

For each row in the pivot table, I'd like to know which field the row label refers to. So for the highlighted orange cell C17, I would like to return "First Name" (as you can see by hovering over cell A17).

I have some constraints that mean I need to use the pivot table in compact form. It would be easy if I could just use an outline or tabular layout, but I'm restricted to using a single column for my row labels.

Any ideas please? I'm happy to take solutions using either VBA or built-in Excel functions. Thanks!

1

1 Answers

0
votes

In the highlighted cell, use the following formula: =IF(ISNA(MATCH(A17,$A$2:$A$7,0)),$B$1,$A$1)

This will work unless the Last Name also is a First Name that appears in your list.