问题
In Excel 2010, I have a pivot table, in compact form, with 3 Row Labels (that represent a management hierarchy). Which of the 3 management levels is displayed in a particular row will change from day to day. (The source data is on another spreadsheet with the fields Manager L3, Manager L2 and Manager L1 in columns with John Smith, Gary Glen and Bob Stevens under them, respectively.)
In the column next to the pivot table, I need to capture which row label is being shown.
Pivot Table example
Is there a formula I can use to produce that info?
Let me know if you need more information. Thank you in advance.
回答1:
Like I said above, I believe your solution would be to create an array on another (hidden) sheet like:
Then run a VLOOKUP
to it: =VLOOKUP(A45,Sheet1!$A$1:$B$6,2,FALSE)
You'd put that formula in cell B45
on your sheet and drag down.
来源:https://stackoverflow.com/questions/47212578/extract-pivot-table-row-label-not-value