Friday, August 5, 2016

MS Excel 2003: Use an array formula to count the number of occurrences when the value in column A is greater than or equal to the value in column D

Question: In Microsoft Excel 2003/XP/2000/97, how do I count the number of occurrences where the value in column A is greater than or equal to the value in column D?
Answer: You can do this with an array formula.
Let's look at an example.
Microsoft Excel
In cell B15, we want to count the number of occurrences where the value in column A is greater than or equal to the corresponding value in column D. To do this, we've created the following array formula:
=SUM((A2:A12>=D2:D12)*1)
When creating your array formula, you need to use Ctrl+Shift+Enter instead of Enter. This creates {} brackets around your formula as follows:
{=SUM((A2:A12>=D2:D12)*1)}