vendredi 9 mars 2018

How to find MIN or MAX based on criteria (equivalent of MAXIFS and MINIFS) in Excel

I have a question in regards to finding Max or Min values based on multiple conditions (2 to be exact). I don't have 2016 Excel version so I don't have MINIFS or MAXIFS function, so I have to do it manually.

Scenario:

    Column A    Column B   
 1     In          12
 2     In          14
 3     In          11
 4     Out         10
 5     In         #N/A
 6     Out         15

I want to find MIN (and Max) for Column B, but only when Column A has "In", and since Column B also has "#N/A" I want to ensure that get's ignored during finding Min or Max.

My Formula:

=MIN(IF(A1:A6="In",IF(B1:B6<>"#N/A",B1:B6)))

I got a value, but it was off when I manually go filter on the columns for "In" and then finding the MIN for Column B (while excluding #N/A, since it gives "#N/A" when you include it in the MIN range)

Unfortunately, I don't have MINIFS / MAXIFS function, otherwise it would be pretty straight forward. Say, if I had MINIFS function, it would look somehting like this (this formula worked using Averageifs and Sumifs):

=MINIFS(B1:B6,A1:A6,"In",B1:B6,"<>#N/A")

Appreciate the help. Thanks!

Aucun commentaire:

Enregistrer un commentaire