VBA for Pivot Table problem

thelostscott

Board Regular
Joined
May 7, 2010
Messages
226
Code:
Sheets("SOURCE").Range("A1").Select
    
    Range(Selection, Selection.End(xlToRight)).Select
    
    Range(Selection, Selection.End(xlDown)).Select
    
    Sheets.Add
    
    ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:="SOURCE!R1C1:R50000C50", Version:=xlPivotTableVersion12).CreatePivotTable TableDestination:="Sheet2!R3C1", TableName:="PivotTable1", DefaultVersion:=xlPivotTableVersion12
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
And the question is?

Edit: never mind. This is a duplicate - please post responses here.
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,909
Members
452,949
Latest member
beartooth91

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