I'm trying to create in FILTERED worksheet a pivot table from all non-empty cells in ALL_RECORDS worksheet,(populated cells will be different every day), as follows :
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"ALL_RECORDS!R1C1:R3992C19", Version:=6).CreatePivotTable _
TableDestination:="FILTERED!R3C1", TableName:="TablaDinámica1", _
DefaultVersion:=6
Sheets("FILTERED").Select
Cells(3, 1).Select
But I keep getting error 5 (Invalid procedure call or argument) Even if i do it by saving a macro... I need to create the pivot table each time the macro runs. Any help will be greatly appreciated. Thanks in advance!
ALL_RECORDS
? – nicolaus-hee