Get pivot row header name if text matches

123excel

New Member
Joined
Jan 18, 2017
Messages
34
Hi, I need to get a pivot row header name to another cell if another cell matches.

DETAILED EXPLANATION:
Se example of pivot table below.

I have two sheets, lets call them "data" (sheet with pivot table) and "result" (without pivot table). If any text in C:C (in "result") matches any of the text in "data" pivot table (B:B), I want it to get the Row header name in the cell at the right. Lets say C3 matches Text 5, then in D3 I want it to say "ROW HEADER 2".

------------PIVOT TABLE------------
+ROW HEADER
Text 1
Text 2
Text 3
+ROW HEADER 2
Text 4
Text 5
Text 6
-----------PIVOT TABLE-----------

<colgroup><col></colgroup><tbody>
</tbody>
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi, I need to get a pivot row header name to another cell if another cell matches.

DETAILED EXPLANATION:
Se example of pivot table below.

I have two sheets, lets call them "data" (sheet with pivot table) and "result" (without pivot table). If any text in C:C (in "result") matches any of the text in "data" pivot table (B:B), I want it to get the Row header name in the cell at the right. Lets say C3 matches Text 5, then in D3 I want it to say "ROW HEADER 2".

------------PIVOT TABLE------------
+ROW HEADER
Text 1
Text 2
Text 3
+ROW HEADER 2
Text 4
Text 5
Text 6
-----------PIVOT TABLE-----------

<tbody>
</tbody>

easiest solution would be to change the layout of the pivot table to tabular form so you'll get 2 separate columns and toggle repeat all item labels.. this way, you can just use this formula to return the header:

=INDEX(Data!B:B,MATCH(C3,Data!C:C,0))
 
Upvote 0

Forum statistics

Threads
1,216,730
Messages
6,132,398
Members
449,725
Latest member
Enero1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top