DataPivotField.Orientation = xlHidden hiding more than it should! AAAHHHH!!!

Myriad_Rocker

Board Regular
Joined
Dec 1, 2004
Messages
67
So this is super frustrating...

I have a pivot table with three data fields (columns). Just to the right of that are five columns that I calculate using formulas.

When I execute this: ActiveSheet.PivotTables("PVT_Comparison").DataPivotField.Orientation = xlHidden

The freakin' thing wipes out six total columns. The three data fields (good to hide) and then my three formula columns to the right (but leaves the last 2 formula columns untouched).

Is there some sort of number I need to change that tells the pivot how many data fields are there? I don't get why this is happening!

Hopefully someone can help.

FYI: The pivot used to be six data fields (columns) wide. I had to take three out and make them formula columns. The reasons for that are multi-dimensional, trust me. It was a MUST scenario.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,224,605
Messages
6,179,860
Members
452,948
Latest member
UsmanAli786

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