Forum Discussion

TSmithSIGN's avatar
TSmithSIGN
Copper Contributor
Sep 08, 2021
Solved

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...
  • SergeiBaklan's avatar
    Sep 08, 2021

    TSmithSIGN 

    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.

Resources