Question

I need to find minimums in a list of companies and prices. For example in one column I have apples, pears and grapes. For each of these there are several sellers and each of them has a different price. The list in the A coulmn would be Apple, Apple, Apple, Grapes, Grapes, Pear, Pear, Pear, Pear. In B would be Target, Trader Joe's, Harris Teeter etc... And in column C would be the price. Fruits in column A are in alphabetical order. I need to find a separate minimum for every fruit. I can do that manually except I have thousands of rows of data.

I'm thinking along the lines that I need to specify the area in which I want to return the minimum from. That would be as long as the entity in column A is the same, that's the area.

Does anyone know a solution for this problem?

Was it helpful?

Solution

If data starts at row 2 (headers in row 1) try this formula in D2 copied down

=IF(A2=A1,"",MIN(OFFSET(C2,0,0,COUNTIF(A:A,A2))))

That will give you the minimum price on the first row of each fruit. Filter column D on non-blanks to see just the minimums

OTHER TIPS

Use a combination of IF and MIN

=MIN( IF ( logical_test, value_if_true, value_if_false ) )

e.g.

=MIN( IF ( A2:A100="Apple", B2:B100, 0 ) )

You can use PivotTables:

  1. Select your data and insert a PivotTable:

    enter image description here

  2. Choose a location to put it. I'll put it in the same sheet:

    enter image description here

  3. Click, drag and drop the fruits under Row Label and the Price under Row Values:

    enter image description here

  4. Right click on the PivotTable and pick Summarise by > Minimum:

    enter image description here

And you should end up with this:

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top