SOLVED

COUNTIFS with <>= and cell reference

Copper Contributor

Hello, my issue is that I am trying to count the number of observations between a range of values, and the COUNTIFS formula fits perfectly. If I write the formula as >=, <= and write the number it works fine, however, if I write >=, <= and reference a cell with the same number, it doesn´t work, the result shows 0.

 

This is a problem because I pretend to apply the formula to a big set of value ranges, and the fact that I have to write de number in each COUNTIFS makes it impossible to write once and drag the formula to collect the entire set of ranges.

4 Replies
best response confirmed by Carlos1290 (Copper Contributor)
Solution

@Carlos1290 Try writing the criteria similar to this (suppose A1 holds the number you want to use in the COUNTIFS:

"<=" & A1

 

Thak you very much @Riny_van_Eekelen  That works perfectly!

@Carlos1290 

A nice feature of COUNTIFS etc, is that it is possible to test many intervals simultaneously as an array

= COUNTIFS(

observed.times, ">=" & interval.start, 

observed.times, "<"  &  interval.end )

If the results form a continuous set of 'bins', FREQUENCY will achieve a similar result

= FREQUENCY( observed.times, time.slots )

Thank you @Peter Bartholomew I am just learning to use it!

1 best response

Accepted Solutions
best response confirmed by Carlos1290 (Copper Contributor)
Solution

@Carlos1290 Try writing the criteria similar to this (suppose A1 holds the number you want to use in the COUNTIFS:

"<=" & A1

 

View solution in original post