Pivot table first title cell issue

natetc

Board Regular
Joined
Oct 2, 2008
Messages
127
I'm trying to create a pivot table and the 1st cell A1 (the header cell) is not being captured when I select the cells for the pivot table. The system automaticall starts from A2 downwards. After manually inputting the Cell range it works, but doesn't work in my macro.

What am I doing wrong? I feel its something simple and stupid.

Thanks in advance!
 

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.
Here is the macro formula that requires debugging....

ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Country of Work!R1C1:R65536C1", Version:=xlPivotTableVersion10). _
CreatePivotTable TableDestination:="Country of Work!R3C4", TableName:= _
"PivotTable10", DefaultVersion:=xlPivotTableVersion10
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,834
Members
452,947
Latest member
Gerry_F

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