.PivotTable.PivotCache.MemoryUsed takes an aweful long time on large pivots.

JeffreyWeir

Super Moderator
Staff member
Joined
Mar 22, 2011
Messages
357
Reaction score
0
Points
0
Location
New Zealand
Not a question but an observation, really.

PivotTable.PivotCache.MemoryUsed takes an aweful long time on large pivots.

Code:
Sub test()
Dim start As Date
 start = Now()
Debug.Print "MemoryUsed: " & ActiveCell.PivotTable.PivotCache.MemoryUsed / 1000 & "kB"
Debug.Print "Time Taken: " & Format(Now() - start, "HH:MM:SS") & " seconds"
End Sub

MemoryUsed: 524.476kB
Time Taken: 00:00:05 seconds

5 seconds? For a half MB pivot? What the heck, Excel...are you using your fingers to count?
 
Ahh...it's specific to the pivot table i'm working on. Must have some bug in it somewhere, because I get the same result no matter what machine I try it with. However, if I extract all the data and make a new pivot, it takes no time at all.


There you go.
 
Back
Top