This is the macro I got when i recorded for pivot table creation.
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"Sheet1!R2C1:R278C35").CreatePivotTable TableDestination:="", TableName:= _
"PivotTable1", DefaultVersion:=xlPivotTableVersion10
These macro creates a new worksheet for pivot table report but i want the pivot table to be created in the specified sheet say
activeworkbook.sheets(2)
I was guessing TableDestionation is the path where you have to give the sheet name for pivot table creation but I dont know how to set the path over there
and I'm also Unable to figure it out how to specify a specific range in the pivot table
SourceData:= "Sheet1!R2C1:R278C35" ' how to specify a range using variables
I have to specify these range
Sheet1.range("A2:AI" & last_row)
here it takes defualt range like these
"Sheet1!R2C1:R278C35"
I'm So confused with the RC notation , Please help me with these Thanks