(EXCEL) How to make a final column that counts the number of numbers that is larger compared to the other row in excel?

Viewed 38

I want to make a table that, in its final column, counts the number of numbers such that the row is larger than the other row. However, since the sample size for me is rather large, I want an excel formula to do this for me.

I have tried using sum, if, sumif, sumifs commands, but none seems to work (at least I can't get it to work). Any help would be appreciated.

Here is a small sample:

enter image description here

2 Answers

You can do =SUM(--(row_2_range>row_1_range)).

For example:

enter image description here

EDIT: to account for blanks and non-numeric data, you can use something like

=SUM(--(IF(ISNUMBER(G3:I3),G3:I3,0)>IF(ISNUMBER(G2:I2), G2:I2,0)))

You may try SUMPRODUCT()

=SUMPRODUCT(--(A1:F1>A2:F2))

In G2 cell =SUMPRODUCT(--(A2:F2>A1:F1)).

enter image description here

Related