SKU to number referencing: retrieving sku value from VBA module

dversloot1

Board Regular
Joined
Apr 3, 2013
Messages
113
Hello!

I'm normally pretty good a googling a solution for a VBA problem however this one has be stumped.

Recently, our IT department transitioned one data cube over to another. In this new Data Cube our SKUs are now assigned a value. This value though is not shown in any accessible field. I discovered the SKU to value relationship when I recorded a macro:
ActiveSheet.PivotTables("PivotTable1").PivotFields("[Item].[SKU].[SKU]").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("[Item].[SKU].[SKU]").CurrentPageName = "[Item].[SKU].&[2523]"

The code use to be:
ActiveSheet.PivotTables("PivotTable1").PivotFields("[Item].[SKU].[SKU]").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("[Item].[SKU].[SKU]").CurrentPageName = "[Item].[SKU].&[abcdefg]"

I'm wondering if anyone knows how to code a loop through each of the SKUs in the cube, then to copy the corresponding value to a reference table in a sheet.
Ideally like this:
[TABLE="width: 142"]
<tbody>[TR]
[TD]SKU[/TD]
[TD]VALUE[/TD]
[/TR]
[TR]
[TD]abc[/TD]
[TD="align: right"]123[/TD]
[/TR]
[TR]
[TD]efg[/TD]
[TD="align: right"]234[/TD]
[/TR]
[TR]
[TD]dfgw[/TD]
[TD="align: right"]469[/TD]
[/TR]
</tbody>[/TABLE]

Hope this is possible!

Dan
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I think we need more data, if you have a pivot table available can you not open the source and find this value within that?
 
Upvote 0
Kuljack,
The pivot table is connected through a data connection... data isn't visible on my end unfortunately.
 
Upvote 0
No, I meant you should be able to double click a value within the pivot table, or draft one of the values in the pivot table function to the value field and draft a sheet of data from the table.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,193
Members
452,616
Latest member
intern444

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