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,

Extremely SignificantVery SignificantModerately SignificantSlightly SignificantNot at all SignificantGrand Total
1942Not at all SignificantGrand Total#REF!
23621820
35422720
47261420
57223620
643Slightly SignificantNot at all SignificantGrand Total#REF!
76242620
885Slightly SignificantNot at all SignificantGrand Total#REF!
97211920
106131920
11023Not at all SignificantGrand Total#REF!
12Very SignificantModerately SignificantSlightly SignificantNot at all SignificantGrand Total#REF!
1313111420
1432121220
1531321120

<colgroup><col><col><col><col span="2"><col><col></colgroup><tbody>
</tbody>
 

bmacias

Board Regular
Joined
Sep 11, 2002
Messages
209
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
 

Forum statistics

Threads
1,081,690
Messages
5,360,624
Members
400,592
Latest member
badgergurl

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top