Search code examples
excelexcel-formulaexcel-2010

Assigning a value based on duplicates and lowest price


I have the following data:

enter image description here

What I want to do is create a formula that assigns a value "1" if a number is a duplicate number AND at the same time has the lowest price of all its duplicates. The above data should have another column, so the final result looks like this:

enter image description here

Is there anyone that can help with this? Thanks in advance.


Solution

  • This would work

    =IF(B2=MINIFS(B:B,A:A,A2),1,0)
    

    If you can work with boolean responses rather 1/0's then you can simplify to below such that FALSE = 0 & TRUE = 1

    =B2=MINIFS(B:B,A:A,A2)