Extract Pivot Table Row Label (not value)

大兔子大兔子 提交于 2021-02-10 06:48:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!