Missing Columns

DSL1970

New Member
Joined
Jun 28, 2012
Messages
16
I am working on some vlookups from a Pivot table that has five results on them; however some of the results are null, so the column disappears. I have been able to link it to the grand total, which is what I want, just not to sure how I can get it to link on the columns. This is my statement:


=IF(AND((VLOOKUP("Grand Total"&"",Workings!$I$110:$N$130,2,0)),D$7=Workings!J$110),(VLOOKUP("Grand Total"&"",Workings!$I$110:$N$130,2,0)),Workings!J$110)


Where the Workings is the Pivot Tables, and once a column is missing, I have the statement indicate what result was in that question. Just need to ensure that each pivot result is going into the correct column on my data sheet. You will see from below that question 1 does not have any values for Slightly Significant, and the results coming up in that column would be for Not at All Significant. I would prefer the Slightly Significant column having a zero, and move the Not at all significant to the correct corresponding column.

Regards,

[TABLE="width: 792"]
<colgroup><col><col><col><col span="2"><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD="align: center"]Extremely Significant[/TD]
[TD="align: center"]Very Significant[/TD]
[TD="align: center"]Moderately Significant[/TD]
[TD="align: center"]Slightly Significant[/TD]
[TD="align: center"]Not at all Significant[/TD]
[TD="align: center"]Grand Total[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]Not at all Significant[/TD]
[TD="align: center"]Grand Total[/TD]
[TD="align: center"]#REF![/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]Slightly Significant[/TD]
[TD="align: center"]Not at all Significant[/TD]
[TD="align: center"]Grand Total[/TD]
[TD="align: center"]#REF![/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]Slightly Significant[/TD]
[TD="align: center"]Not at all Significant[/TD]
[TD="align: center"]Grand Total[/TD]
[TD="align: center"]#REF![/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]0[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]Not at all Significant[/TD]
[TD="align: center"]Grand Total[/TD]
[TD="align: center"]#REF![/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]Very Significant[/TD]
[TD="align: center"]Moderately Significant[/TD]
[TD="align: center"]Slightly Significant[/TD]
[TD="align: center"]Not at all Significant[/TD]
[TD="align: center"]Grand Total[/TD]
[TD="align: center"]#REF![/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]14[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]20[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I'm not sure I follow you entirely, but when faced with a similar situation, I create a secondary table with error checking. In this manner one can account for the disappearing columns on certain questions. SO in your case I would create a table and in one column I would have the words Extremely Significant, Very Significant, Moderately Significant, Slightly Significant, Not at all Significant, Grand Total. On a 2nd column I would do a vlookup such as "if(iserror(vloookup(K5,I110:N130,2,0)),0,vloookup(K5,I110:N130,2,0)). Where k5 houses the first value of the created table "Extremely Significant"; therefore, if "Extremely Significant" has disappeared from the pivot table, it returns a 0. Have your vlookups point to this table instead of the pivot itself. Hope this is of use to you.

Cheers,

Ben
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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