Forum Discussion
TSmithSIGN
Sep 08, 2021Copper Contributor
Trying to find the shortest duration out of a array of numbers based on several conditions
Hello, attached is a sample spreadsheet, where I'm trying to find the shortest number of days in the attached example file. It has 4 columns, the 1st column is a list of "case #s", each case may h...
- Sep 08, 2021
I'm not sure where you'd like to place these numbers and on which version of Excel you are. Formulae could be
=XLOOKUP(A2,$A$2:$A$60/$D$2:$D$60,$C$2:$C$60,-1,0,1)or
=IFERROR( AGGREGATE( 15,6,1 / ($A$2:$A$60=A2) / $D$2:$D$60*$C$2:$C$60, 1 ), -1)If I understood the logic correctly.
SergeiBaklan
Sep 08, 2021Diamond Contributor
I'm not sure where you'd like to place these numbers and on which version of Excel you are. Formulae could be
=XLOOKUP(A2,$A$2:$A$60/$D$2:$D$60,$C$2:$C$60,-1,0,1)
or
=IFERROR( AGGREGATE( 15,6,1 / ($A$2:$A$60=A2) / $D$2:$D$60*$C$2:$C$60, 1 ), -1)
If I understood the logic correctly.
TSmithSIGN
Sep 08, 2021Copper Contributor
Thank you Sergei,
both work like I was hoping. I like how you used the / in the lookup array with the XLOOKUP function!
both work like I was hoping. I like how you used the / in the lookup array with the XLOOKUP function!
- SergeiBaklanSep 09, 2021Diamond Contributor
TSmithSIGN , you are welcome, glad it helped