Forum Discussion

Mike_D4268's avatar
Mike_D4268
Copper Contributor
Mar 20, 2024

COUNTIFS to count if data values in Column B are higher than the data values in Column A

Hello,

 

Can someone help me with the formula needed to count the number of occurrences, wherein, the data listed in Column B is higher than the data listed in Column A?

 

The answer in the below example would be, 3.

 

 

    • Mike_D4268's avatar
      Mike_D4268
      Copper Contributor
      Thanks OliverScheurich, your SUMPRODUCT formula accomplished my goal. I appreciate it. The user Detlef Lewin's formula also worked.
  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    Mike_D4268 

    Your attempt at using the COUNTIFS function is almost correct, but it needs a slight adjustment to work properly. COUNTIFS requires multiple conditions to be specified separately, and you cannot directly compare two ranges like B4:B8>A4:A8 within a single condition. Instead, you can use two separate conditions to achieve your goal. Here's the correct formula:

    =COUNTIFS(B4:B8,">"&A4:A8)

    This formula will count the number of occurrences where the values in Column B are higher than the corresponding values in Column A within the specified range.

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

     

    Was the answer useful? Mark as best response and like it!

    This will help all forum participants.

    • Mike_D4268's avatar
      Mike_D4268
      Copper Contributor

      NikolinoDE 

      Thanks NikolinoDE, but that did not work.  That formula populated an array of five different numbers!  I am looking for it to return a single number, 3.

       

Resources