hi all
I recorded a Macro and I'm chaning all the parts to work regardless of how much data I have but I cant get the pivot to work, I just need it to select all the data on the sheet which will always have 19 columns but the row number will vary each time I run the report.
how can I amend this: I have trieds lots of solutions from here and other places and cant get anything to work. I cant preselect as this shows the word 'blank' and I cant have that in the report: I also need to make sure the pivot is on a new sheet.
Heres the snapshot:
Sheets.Add
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Data!R1C1:R2007C17", Version:=xlPivotTableVersion10).CreatePivotTable _
TableDestination:="Sheet1!R3C1", TableName:="PivotTable1", DefaultVersion _
:=xlPivotTableVersion10
Sheets("Sheet1").Select
Cells(3, 1).Select
thanks in advance
I recorded a Macro and I'm chaning all the parts to work regardless of how much data I have but I cant get the pivot to work, I just need it to select all the data on the sheet which will always have 19 columns but the row number will vary each time I run the report.
how can I amend this: I have trieds lots of solutions from here and other places and cant get anything to work. I cant preselect as this shows the word 'blank' and I cant have that in the report: I also need to make sure the pivot is on a new sheet.
Heres the snapshot:
Sheets.Add
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Data!R1C1:R2007C17", Version:=xlPivotTableVersion10).CreatePivotTable _
TableDestination:="Sheet1!R3C1", TableName:="PivotTable1", DefaultVersion _
:=xlPivotTableVersion10
Sheets("Sheet1").Select
Cells(3, 1).Select
thanks in advance