VBA GetPivotData error handling

bl4met

New Member
Joined
Dec 15, 2011
Messages
19
I have code that pulls data from a pivot table and places it another table. It will work fine until it tries to do a look up in the pivot table for a value that isn't listed in the pivot table. The Pivot table is based on pulls from our ticketing system so it might not have tickets from all the regions but the table I'm pulling the data for lists all the regions. If I was getting a #NA or a #REF I would just check for it and change it to 0 but I'm getting a Run Time Error 1004.

Code:
ActiveCell = (ptSysTotal.GetPivotData("Duration by Time and Impact", "System", ActiveCell.Offset(0, -1).Value & " "))
Any help would be nice
 

bl4met

New Member
Joined
Dec 15, 2011
Messages
19
Thanks, cant believe I didn't think of that. I'm always bad a writing error trapping into my code, especially when I'm the one running it. I really need to get better at that. Thanks again!
 

Forum statistics

Threads
1,085,543
Messages
5,384,338
Members
401,887
Latest member
Somesh

Some videos you may like

This Week's Hot Topics

Top