Help! Pivot table shows #DIV/0! error on all cells derived from IF/THEN formulas in source sheet

beetelman

New Member
Joined
Nov 15, 2006
Messages
6
I am using Excel 2010 on a Win7 OS. I created a pivot table based on a fairly small data set (20 rows), a combination of text, formulas, percentages, numbers, etc.). In the pivot table, the values from the source sheet that are derived from If/Then formulas show up in the pivot table as #DIV/0!, but the value in the source sheet shows up as 50% or 20% or some other percentage.

The 50% (or other percentage value) is a result of the following formula: =IF(O2=5,”0%”,IF(O2=4,”20%”,IF(O2=3,”40%”,IF(O2=2,”60%”,IF(O2=1,”80%”,IF(O2=0,”100%”)))))). In other words, I’m assigning a % value based on a numerical ranking from 0 to 5. However, the Pivot table does not recognize the formula-derived value. If I just hard key “50%” into the source sheet cell, I have no problem seeing it show up in the pivot table. The pivot table does not seem to "read" a value derived from this If/Then statement.

Also, I created "dummy" columns adjacent to the If/Then formula values and used an "=XX" where "XX" is the value of the cell in the adjacent column, but the Pivot table returned the same #DIV/0! value.

I can't find any other Excel message boards where this problem was discussed.


Thanks for any help you can offer.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
what happens if you make your formula: =(5-O2)/5

I think part of the problem may be that your last IF "if(O2=0" is missing an the 3rd parameter. But pivot tables don't work very well when the value fields are strings. You could try it without the quotes on the percent values.
 
Upvote 0
Thanks for your reply. Both recommendations worked perfectly, and the =(5=O2)/5 formula is so much easier than the long If/Then string. However, removing the quotations from the percent values also worked, by the way.

Thanks again. I've Googled the heck out of this problem and haven't found an answer until now. Really appreciate it.
 
Upvote 0
Thank you for the feedback.

Welcome to the forum.

I have searched numerous Excel forums and the best answers are here.
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,234
Members
449,092
Latest member
SCleaveland

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top