Home > OS >  Is there an excel formula that looks at a column of duplicates and returns the value next to the low
Is there an excel formula that looks at a column of duplicates and returns the value next to the low

Time:04-19

In Excel, for the below table, I need a formula that I can drag down in Column C. It would look at Column A, find a duplicate, then bring the lower value of the duplicate from Column B associated with Column A. For example Apple has 2 values 104 and 105, hence it places 104 in Column C.

A B C
Apple 105 FORMULA
Apple 104 104
Mango 111
Pear 115
Pear 114 114
Banana 201

CodePudding user response:

If you wanted to do this with the topmost value from Column B, you could just use enter image description here

If instead you want to put the value next to the minimum value for that criteria one can use:

=IF(AND(MINIFS(B:B,A:A,A1)=B1,COUNTIF(A:A,A1)>1),B1,"")

instead.

If one does not have MINIFS(), Replace the MINIFS(B:B,A:A,A1) with AGGREGATE(15,7,B:B/(A:A=A1),1)

  • Related