ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   COUNTIF to compare one range versus another range (https://www.excelbanter.com/excel-programming/390388-countif-compare-one-range-versus-another-range.html)

Phil

COUNTIF to compare one range versus another range
 
Okay I know how array formulas work but I'm having trouble with the
following. I want to count the number of times each value in column D
is less than each corresponding value in column B. What I have is

{=COUNTIF(D2:D100, "<B2:B100")}

but it doesn't work (it always returns 0).

Any ideas?


Don Guillett

COUNTIF to compare one range versus another range
 
try this NON-array entered formula
=SUMPRODUCT((d7:d18<b7:b18)*1)

--
Don Guillett
SalesAid Software

"Phil" wrote in message
ups.com...
Okay I know how array formulas work but I'm having trouble with the
following. I want to count the number of times each value in column D
is less than each corresponding value in column B. What I have is

{=COUNTIF(D2:D100, "<B2:B100")}

but it doesn't work (it always returns 0).

Any ideas?



JE McGimpsey

COUNTIF to compare one range versus another range
 
One way (array-entered):

=SUM(--(D2:D100<B2:B100))

In article . com,
Phil wrote:

Okay I know how array formulas work but I'm having trouble with the
following. I want to count the number of times each value in column D
is less than each corresponding value in column B. What I have is

{=COUNTIF(D2:D100, "<B2:B100")}

but it doesn't work (it always returns 0).

Any ideas?


Phil

COUNTIF to compare one range versus another range
 
Wow thanks guys! I spent about an hour trying to figure this out.



All times are GMT +1. The time now is 03:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com