How to apply countif?

G

Guest

Does anyone have any suggestions on how to apply countif?
=Countif(Range, Criteria)
There is a table C1:Z100, and there is a list of number under column A1:A100

There is a given number 3 in cell A200, I would like to apply countif
function under the column B in order to find out how many numbers under the
table match the number under column A1:A100 with error range 3, which is
given in cell A200.
The error range means that 1 under column A is match 3 within the table
C1:Z100, because 3-1=2, which is within the error range 3, then I consider 3
is matching the number 1.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
 
T

T. Valko

One way:

C1:Z100 = rng

Entered in B1 and copied down as needed:

=COUNTIF(rng,">="&A1-A200)-COUNTIF(rng,">"&A1+A200)
 
T

T. Valko

If you don't mind hard coding the error range this is probably as compact a
formula as you can have:

=FREQUENCY(rng,A1+{3,-4})
 
T

T. Valko

Entered in B1 and copied down as needed:
=COUNTIF(rng,">="&A1-A200)-COUNTIF(rng,">"&A1+A200)

Better make that reference to A200 absolute:

=COUNTIF(rng,">="&A1-A$200)-COUNTIF(rng,">"&A1+A$200)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top