Skip to main content
Bumped by Community user
edited title
Link

Can this be done via formula? Columns populated with the number of times each row has the first, second or third largest value for any given column

Bumped by Community user
Bumped by Community user
Source Link
jamauss
  • 109
  • 3

Can this be done via formula?

So let's say I have a sheet with data like this:

    A     B     C     D     E
1   25    25    15     5    10
2   15    15    10    10    20
3   10    10    20    15     5
4    5    20    25    25    15
5   20     5     5    20    25

Currently I have some conditional formatting (using LARGE()) that color codes certain cells to indicate the first, second, and third largest values, per column. That works great.

What I would like to add, is three more columns, populated with the number of times each row has the first, second or third largest value for any given column. Is that possible with a formula, or would it require something more complex like a custom function? I basically need to evaluate each row, but filter the data by the column each cell belongs to.

Using the example data above, this would give me values like:

     1st   2nd   3rd
1     2     0     1
2     0     1     2
3     0     1     1
4     2     1     1
5     1     2     0

I've looked into several different formula functions like FILTER() and others, but I can't get anything working.