Solved

how to deal with getpivotdata returing #ref!

Posted on 2011-03-25
4
341 Views
Last Modified: 2012-06-22
I have a pivot that shows data over time and includes historical data. A table that references that pivot shows the data for each month in the year, so, when the current year is selected, some cell have a #ref! because that month hasn't occurred yet and there's no data in the pivot, or, historically we don't have all the data for a previous year.

We need to be compatible with 2003, so, iserror is out and we also need to chart and do formulas based on the table (that get it's data from the pivot).

I also would like it so that if I sum 3 months (for a quarter) that all have no data, the result would be blank and not 0.

I did try =if(isref(getpivotdata(xxx), getpivotdata(xxx),"")
but, summing 3 cells like that, that are "", returns 0 and I'd rather have the result be blank, and, that formula seems rather long.

thanks
alan
0
Comment
Question by:avoorheis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:TonyWong
ID: 35216718
Depending on what version of Excel you're using, you can go into the OPtions and Advanced then uncheck 'Show zero in cells that have a zero value' (Excel 2010).

As for the other part  in your question, hope someone else can give you a solution.

Cheers,
Tony
0
 

Author Comment

by:avoorheis
ID: 35216726
using excel 2007, but, must be compatible with 2003
0
 
LVL 33

Accepted Solution

by:
Rob Henson earned 300 total points
ID: 35216797
You can use iserror in 2003 so this would work:

IF(ISERROR(GETPIVOTDATA(###)),0,GETPIVOTDATA(###))

Cheers
Rob H
0
 
LVL 1

Assisted Solution

by:TonyWong
TonyWong earned 200 total points
ID: 35216835
here's a wee link:

http://office.microsoft.com/en-us/excel-help/hide-error-values-and-error-indicators-in-cells-HP003056121.aspx#BMformat_text_in_cells_that_contain_err

It's for Excel 2003 so you should be able to do any of the methods listed in this article.

Cheers,
Tony
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

733 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