Solved

how to deal with getpivotdata returing #ref!

Posted on 2011-03-25
4
335 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 32

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 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