Solved

how to deal with getpivotdata returing #ref!

Posted on 2011-03-25
4
340 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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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,…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

808 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