Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Multi-Conditional Xlookup with spill array inputs

I have an array with several columns that are spill ranges. I need to use each column to do a multi-conditional xlookup (or similar formula/result) that gives a spill range of the results. I used a sumifs to get results but when a cell is empty I would like it to remain empty, where the sumifs results gives 0% when a cell is empty.

The real application of this will be put into a LET formula and each of the spills in the xlookup is a choosecols output.

=XLOOKUP(1,($C$3#=$C$12:$C$15)*($D$3#=D12:D15),$E$12:$E$15,"",0)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

=SUMIFS($E$12:$E$15,$C$12:$C$15,C3#,$D$12:$D$15,D3#)

In the image the borders denote a spill array. Expected results are manually entered.

image

>Solution :

You could try using the following formula:

enter image description here


=MAP(C3#,D3#,LAMBDA(α,δ, 
 XLOOKUP(1,(α=C12:C15)*(δ=D12:D15),
 IF(E12:E15="","",E12:E15),"")))

Or,

=LET(a, SUMIFS(E12:E15,C12:C15,C3#,D12:D15,D3#), IF(a=0,"",a))

Or,

=LET(
     a, FILTER(E12:E15,COUNTIFS(C3#,C12:C15,D3#,D12:D15)),
     IF(a=0,"",a))

Or,

=XLOOKUP(C3#&"|"&D3#,C12:C15&"|"&D12:D15,IF(E12:E15=0,"",E12:E15))

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading