HomePrivacy PolicyFeedbackLink to usSite Map

MS Excel: 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 in Excel 2003/XP/2000/97


Question:  In 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 take a look at an example.

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)}