Adding a Second Condition to a Return List Array Formula

Aimee S.

Board Regular
Joined
Sep 28, 2010
Messages
236
Office Version
  1. 365
Platform
  1. Windows
Greetings Folks!

Any notion of how I would add the criteria of 'Query 2 Data (Child Projects)'!$I$4:$I$40000<>"Cancelled" to this existing array in a file I have taken ownership of (and am not too familiar with how this functions)?

{=IFERROR(INDEX('Query 2 Data (Child Projects)'!$E$4:$E$40000,SMALL(IF('Query 2 Data (Child Projects)'!$B$4:$B$40000='Budget-Driven Spread Calculator'!$B$7,ROW('Query 2 Data (Child Projects)'!$B$4:$B$40000)-ROW($B$4)+1),ROWS($B$4:$B4))),"")}

Thanks in advance for your time and knowledge!!!!
Warmly,
Aimee
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Clear the all the formulae from that column & replace it with
Excel Formula:
=FILTER('Query 2 Data (Child Projects)'!$E$4:$E$40000,('Query 2 Data (Child Projects)'!$B$4:$B$40000=$B$7)*('Query 2 Data (Child Projects)'!$I$4:$I$40000<>"Cancelled"))
 
Upvote 1
Solution
@Fluff, the only potential issue I see is that $B$7 may need to be revised to 'Budget-Driven Spread Calculator'!$B$7...but that would not be necessary if the intended B7 reference is on the same sheet as the formula.
 
Upvote 0
Thank you both for your responses but that did not solve the issue. Fluff's suggestion provides repeating rows of one project ID whereas the old formula provides a list smallest to largest of 7 or so project IDs. What I did was add to the SQL the selected column
, case when p.prj_clarity_status = 'Cancelled' then null
else p.prj_id end "Child Project ID Cancelled Excluded"
Then I updated the formula in the OP and referenced that new helper column and the listed project IDs now provide only IDs associated with investments that are not cancelled.

Apologies if the OP was not clear enough and thanks again for looking! It is always fun to inherit files with other mind's approaches to formulas at our job heh. I use the term 'fun' quite loosely. ;)
Cheers.
 
Upvote 0
I also fixed the OP formula in the person's file I was given as it had a couple of errors.
=IFERROR(INDEX('Query 2 Data (Child Projects)'!$F$4:$F$40000,SMALL(IF('Query 2 Data (Child Projects)'!$B$4:$B$40000='Budget-Driven Spread Calculator'!$B$7,ROW('Query 2 Data (Child Projects)'!$B$4:$B$40000)-ROW('Query 2 Data (Child Projects)'!$B$4)+1),ROWS('Query 2 Data (Child Projects)'!$B$4:$B4))),"")
 
Upvote 0
Fluff's suggestion provides repeating rows of one project ID
Did you clear all the formula & then put my suggestion in the 1st cell only?
Also the formula should be normally entered, ie do not use Ctrl Shift Enter.
 
Upvote 0
Try
Excel Formula:
=IFERROR(INDEX('Query 2 Data (Child Projects)'!$E$4:$E$40000,SMALL(IF(('Query 2 Data (Child Projects)'!$B$4:$B$40000='Budget-Driven Spread Calculator'!$B$7)*('Query 2 Data (Child Projects)'!$I$4:$I$40000<>"Cancelled" ),ROW('Query 2 Data (Child Projects)'!$B$4:$B$40000)-ROW($B$4)+1),ROWS($B$4:$B4))),"")}
 
Upvote 0
Sorry Fluff!!! I gave it another go. No repeating rows, and it works great. Some days.... I wonder how I managed to get dressed. lol
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

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