mardi 17 novembre 2020

MIN IF and MAX IF in Excel returns #VALUE error, even as an array formula

I want to return the minimum value and maximum value of a range that corresponds to a unique ID code. My version of Excel does not have MINIFS or MAXIFS.

Say that the range AA:AA contains all unique codes, the cell AA2 contains the unique code for row 2, and the range X:X contains all values to pick out the minimum or maximum from.

I have tried using {=MIN(IF(AA:AA=AA2;X:X))} and {=MAX(IF(AA:AA=AA2;X:X))} as array formulas, but both return a #VALUE error.

When entered as regular formulas, =MIN(IF(AA:AA=AA2;X:X)) and =MAX(IF(AA:AA=AA2;X:X)) return the minimum and maximum values of the whole of X:X, respectively, ignoring the IF statement.

What's going wrong, here? Is there another solution?

Aucun commentaire:

Enregistrer un commentaire