Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

COUNTIF COLUMN A is GREATER THAN COLUMN B

Let's say I have a spreadsheet like this:

     A.         B. 
1. $0.00......$129.57
2. $139.14...$129.57
3. $539.00...$136.50   

Basically, I am trying to ONLY Count the Number of cells in Column A if they are greater than those in column B. So for the above spreadsheet I would want the result to be 2.

I know it's got to be simple but the variations I'm trying aren't working. Any help is greatly appreciated.

like image 505
Robert P Avatar asked Dec 04 '25 17:12

Robert P


1 Answers

One way is via this array formula:

=ArrayFormula(COUNT(if(A1:A3>B1:B3,1)))
like image 87
Scott Holtzman Avatar answered Dec 07 '25 22:12

Scott Holtzman