Need assistance using VSTACK with CHOOSECOLS and FILTER functions

sspatriots

Well-known Member
Joined
Nov 22, 2011
Messages
585
Office Version
  1. 365
Platform
  1. Windows
I have this formula below that displays 5 columns. It is stacking 3 sets of filtered ranges. I noticed that if the result for either of those filtered ranges is blank, then the result returns a blank in the first column cell, but the remaining 4 columns return "#N/A". I added the "IFERROR" part to try and prevent any error messages that came back as "#CALC!", however, it only worked for the cell in the first column. Any ideas how to fix this would be greatly appreciated. Thanks, SS

Excel Formula:
=VSTACK(IFERROR(CHOOSECOLS(FILTER(G2JobList[[Job Name]:[Wiring
PO]],(G2JobList[Job
Status]="1 ACT")*(INDIRECT("G2JobList["&AJ7&"]")="")*(INDIRECT("G2JobList["&AI7&"]")>=TODAY())*(INDIRECT("G2JobList["&AI7&"]")<=TODAY()+30)*(INDIRECT("G2JobList["&AI7&"]")<>0)),1,2,24,35,36),""),

IFERROR(CHOOSECOLS(FILTER(G2JobList[[Job Name]:[Wiring
PO]],(G2JobList[Job
Status]="1 ACT")*(INDIRECT("G2JobList["&AJ8&"]")="")*(INDIRECT("G2JobList["&AI8&"]")>=TODAY())*(INDIRECT("G2JobList["&AI8&"]")<=TODAY()+30)*(INDIRECT("G2JobList["&AI8&"]")<>0)),1,2,24,43,44),""),

IFERROR(CHOOSECOLS(FILTER(G2JobList[[Job Name]:[Wiring
PO]],(G2JobList[Job
Status]="1 ACT")*(INDIRECT("G2JobList["&AJ9&"]")="")*(INDIRECT("G2JobList["&AI9&"]")>=TODAY())*(INDIRECT("G2JobList["&AI9&"]")<=TODAY()+30)*(INDIRECT("G2JobList["&AI9&"]")<>0)),{1,2,24,50,51}),""))
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi

filtered ranges is blank

=Filter(Rng,Rng2=1,{1.2.3.4})
 
Upvote 0
Hi

filtered ranges is blank

=Filter(Rng,Rng2=1,{1.2.3.4})
I'm sorry, I'm not following what you are suggesting. This is the first time I've tried to combine these three functions. It works well except for when there is a blank in the first column, then all the rest in that row will show up as "#N/A".
 
Upvote 0
I did go back and add an "IFERROR" at the beginning of the whole formula and that got rid of all the "#N/A" errors in the subsequent columns on the same row, however, I have a bunch of empty rows now in my results that I need to make go away.

Excel Formula:
=IFERROR(VSTACK(IFERROR(CHOOSECOLS(FILTER(G2JobList[[Job Name]:[Wiring
PO]],IFERROR((G2JobList[Job
Status]="1 ACT")*(INDIRECT("G2JobList["&AJ7&"]")="")*(INDIRECT("G2JobList["&AI7&"]")>=TODAY())*(INDIRECT("G2JobList["&AI7&"]")<=TODAY()+30)*(INDIRECT("G2JobList["&AI7&"]")<>0),"")),1,2,24,35,36),""),

IFERROR(CHOOSECOLS(FILTER(G2JobList[[Job Name]:[Wiring
PO]],IFERROR((G2JobList[Job
Status]="1 ACT")*(INDIRECT("G2JobList["&AJ8&"]")="")*(INDIRECT("G2JobList["&AI8&"]")>=TODAY())*(INDIRECT("G2JobList["&AI8&"]")<=TODAY()+30)*(INDIRECT("G2JobList["&AI8&"]")<>0),"")),1,2,24,43,44),""),

IFERROR(CHOOSECOLS(FILTER(G2JobList[[Job Name]:[Wiring
PO]],IFERROR((G2JobList[Job
Status]="1 ACT")*(INDIRECT("G2JobList["&AJ9&"]")="")*(INDIRECT("G2JobList["&AI9&"]")>=TODAY())*(INDIRECT("G2JobList["&AI9&"]")<=TODAY()+30)*(INDIRECT("G2JobList["&AI9&"]")<>0),"")),1,2,24,50,51),""),
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

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