Solved

Reference to Pivot Table returns #REF

Posted on 2013-12-17
2
351 Views
Last Modified: 2013-12-18
I have Excel worksheets connected to Access tables, which create Pivot Tables.  The results are grouped by month, and I have a cover sheet which summarizes the data from multiple worksheets.

There is a summary line for each month, but if the pivot table does not have a line for that month, the it returns #REF, and messes up any calculation using that cell.

For example: if there is no month 10 (October) =GETPIVOTDATA("ChargeAmount",'camper charges'!$A$1,"ChargeDate",10) returns #REF

Is there anyway to use an IF THEN, so it returns 0 if row 10 does not exist?
0
Comment
Question by:pjfromny
2 Comments
 
LVL 17

Accepted Solution

by:
andrewssd3 earned 500 total points
ID: 39725886
If you have Excel 2007 or later you can say
=IFERROR(GETPIVOTDATA("ChargeAmount",'camper charges'!$A$1,"ChargeDate",10),0)

Open in new window

If you are on 2003 or before you need to use the longer-winded
=IF(ISERROR(GETPIVOTDATA("ChargeAmount",'camper charges'!$A$1,"ChargeDate",10)),0,GETPIVOTDATA("ChargeAmount",'camper charges'!$A$1,"ChargeDate",10))

Open in new window

0
 

Author Closing Comment

by:pjfromny
ID: 39726828
Just what I needed!  Thanks!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now