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.
You can use the COUNTIFS function in Excel to count cells in a single range with a single condition as well as in multiple ranges with multiple conditions.
Using COUNTIF with multiple criteria. The best function you can use for situations when you need to count cells based on multiple criteria is the COUNTIFS function. The “s” on the end of Countif makes it plural, and that means that there are multiple criteria.
Using COUNTIFS to Count Between two Numbers First, enter the “=COUNTIS(“ in cell C1. After that, refer to the range from where you want to count the values. Next, you need to specify the upper number using greater than and equal sign. From here, again you need to refer to the range of numbers in the criteria2.
Actually this is something I would do with a program.
Create a macro to:
There may be an easier non-programming way but I don't know it (and then your question would be closed anyhow).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With