How to transfer all the values in a pivottable column to another table? (offset, getpivotdata)

Wilma13

New Member
Joined
Feb 28, 2013
Messages
3
Hi guys, </SPAN>

I have the following problem. </SPAN>

I have a main table with 6 fixed headers. From which I would like to fill the first 4 headers (columns) with data from a pivot table. The pivot table which will be used as the source also has fixed headers/columns, however the number of rows will vary/ can change.
</SPAN>
For the main table I would like column ‘A’ to show all the values listed in column ‘A’ of the ‘pivot’ table. Column 'B' to show column 'B', C-C and D-D. </SPAN>

I have made some attempt with GETPIVOTDATA (however I believe this formula is intended to return only a few cell’s not a whole column).</SPAN>
In addition I have tried to use OFFSET (here in run into the problem that some cell’s in the pivot table are empty. As such OFFSET will stop ‘selecting’ after the first empty cell, even though are filled cells after that).</SPAN>

Any help and/or suggestions are welcome. </SPAN>
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Welcome to MrExcel.

GETPIVOTDATA returns a value not a reference so you can't OFFSET it. You can use a formula like this to get the row labels from your pivot table (assuming they don't repeat):

=INDEX(A$1:A3,MATCH(REPT("z",255),A$1:A3))

Copy the formula down.

If you are still stuck post a screenshot of your pivot table.
 
Upvote 0
My pivot table looks as follows:

Filter: (B,2) Selling region
(A,5)Customer code
(B,5)Costumer Name
(C,6) 2013
(D,6) 2014
(A,6) AB6
Customer A
$1,200
$900
(A,7) Z5Y
Customer K
$900
$1200
(A,8) BK8
Customer Z
$500
(A,9) ZHI
Customer X
$300

<TBODY>
</TBODY>

I want the main table below to be filled with all information from the pivot table. If I select a different 'Selling region' in the filter and the pivot table changes I want the main table to automatically change and adjust its size to the number of customer listed under Customer Code.

(F,7) Customercode
(G,7) Customer Name
(H,7)2013
(I, 7) 2014
(J,7) variable x
(K,7) variable Y
(F,8) AB6
Customer A
$1,200
$900
other data
other data
(F,9) Z5Y
Customer K
$900
$1200
(F,10) BK8
Customer Z
$500
(F,11) ZHI
Customer X
$300

<TBODY>
</TBODY>


(A,5) = the cell number


Appologies but I was not able to place a simple screenshot. I hope I'm not asking for the impossible. Thank you for all your help!
 
Upvote 0
Why don't you just copy the pivot table ans paste special as values and formats? Your output looks just the same.
 
Upvote 0
Because than the main table will not automically update when I change the filter in the pivot table to a different 'selling region'. At the same time the size of the main table will not adjust to the amount of rows in the pivot table (this is important as I want to directly link the main table to powerpoint).
 
Upvote 0
In F7 copied to G7:K7 and F8:G15:

=IF(LEN(A5),A5,"")

In H8 copied down and across:

=IF(AND(LEN($F8),LEN(H$7)),GETPIVOTDATA("Value",$A$4,$F$7,$F8,$G$7,$G8,"Year",H$7),"")
 
Upvote 0

Forum statistics

Threads
1,215,204
Messages
6,123,630
Members
449,109
Latest member
Sebas8956

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