I have two columns in Excel, like this:
A B 0.5 0.4 0.6 0.59 0.1 0.2 0.3 0.29
I want to count how many of the values in B are less than their corresponding values in A. In this case, the answer is 3.
I can do this by adding an extra column, B-A and then doing COUNTIF(RANGE, '<0'), but I am wondering if there’s a way to do it without adding an extra column.
I realize this is on the fringes of what one might consider programming, but hopefully it’s just on the right side of the line, rather than the wrong side.
This can be done using Excel array formulas. Try doing something like this:
The very very important part, is to press
CTRL-SHIFT-ENTERinstead of justENTERwhen you finished inputting the formula. Otherwise it won’t understand you want to treat the data as an array.