3

Let's say I have the following table.

Team Score
AA   81
BB   67
CC   44
DD   1.5
JJ   279
LL   49
TT   201
GG   158
MM   32
HH   89

I want to get all teams that scored more than 80 in another table. I tried the Index + Match function as follows but it only gives me the smallest value greater than 80.

Here is the code:

=INDEX($A$2:$A$11,MATCH(80,$B$2:$B$11,-1))

Although I put the values in the lookup_array argument in descending order, this function only gives me one answer: The smallest value greater than 80.

I am trying to do this without having to sort the array and with a huge database mind you. Thank you.

Andy G
  • 19,232
  • 5
  • 47
  • 69
Quester
  • 1,969
  • 4
  • 15
  • 13

4 Answers4

4

Enter this formula to D2 and press CTRL+SHIFT+ENTER to make it an array formula, then drag it down.

=INDEX($A$1:$A$11,SMALL(IF($B$2:$B$11>=80,ROW($B$2:$B$11)),ROW(1:1)))

enter image description here

See How to look up a value in a list and return multiple corresponding values for details.

zx8754
  • 52,746
  • 12
  • 114
  • 209
2

How about using an AutoFilter? You're then quite flexible in filtering for values in column score.

mthierer
  • 594
  • 4
  • 9
1

If you don't want to use vba, in a third column you could have

=if(B2 > 80, A2, "")

and copy that formula down. You could even put this column of formulas in another tab and either delete the rows that have nothing in them manually or write code that will do that for you.

Matt Cremeens
  • 4,951
  • 7
  • 38
  • 67
  • It would be best, but I am not sure this asker is after that solution. If it were me, and I guess you, @Quester, I would do something like this `nextRow = 1 for i = 1 to 10 if cells(i,2) > 80 then cells(nextRow, 3)=cells(i,1) nextRow=nextRow+1 end if next i` – Matt Cremeens May 29 '14 at 19:56
0

Create a PivotTable (Team for ROWS, Score for Sigma VALUES, then filter the Sum of Score column for Number Filters, Greater Than..., and 80 next to Show rows where: is greater than *, OK.

* or perhaps is greater than or equal to.

pnuts
  • 58,317
  • 11
  • 87
  • 139