analysislmka.blogg.se

Excel 2013 create pivot table
Excel 2013 create pivot table






Set HandoverPVTRangeData = HandoverPVTSourceData.Range(HandoverPVTRangeString) HandoverPVTRangeString = "A4:H" & HandoverPVTLastRow HandoverPVTLastRow = HandoverPVTSourceData.Cells(Rows.Count, 1).End(xlUp).Row 'Calculates the last used row in the worksheet containing the source data

excel 2013 create pivot table

Set HandoverPVTSourceData = Worksheets("XXXXXHandoverReport")ĭim HandoverPVTLastRow As Integer 'Define the last row of the Source Data 'Define Worksheet that is used to hold the source data 'Define Worksheet that is generated to contain the pivot table. I use Msgbox (stripped out) to map the journey through the code and the data seems to be as I expect. The code appears to be error free but does not produce anything. I am trying to create a Pivot Table using Excel 2013 and VBA. "Results!R2C1:R" & MyRow & "C" & M圜ol, _ Version:=xlPivotTableVersion15.CreatePivotTable _Īny suggestions on what is wrong with the modified code would be greatly appreciated.I hope you can help. Modified Code using variable to determine the last row and column: (SourceType:=xlDatabase, SourceData:= _ TableDestination:="Sheet1!R3C1", TableName:="PivotTable1", DefaultVersion _ "Results!R2C1:R633C25", Version:=xlPivotTableVersion15).CreatePivotTable _ Recorded Code: (SourceType:=xlDatabase, SourceData:= _ I tried to modify the code to create the pivot table but I'm getting a syntax error.

excel 2013 create pivot table

The one twist is that the range of data can change from user to user or time to time depending on a query they run. It has worked great for year but not users are moving to Excel 2013 and it is not working. I have a macro that creates a pivot table.








Excel 2013 create pivot table