One way:
=COUNTIF(A1:A10, ">2") - COUNTIF(A1:A10, ">=5")
Or:
You can use implicit if statement structures in SUMPRODUCT:
=SUMPRODUCT((A1:A10>2)*(A1:A10<5))
In this case note that A1>2 and A1<5 will evaluate as 1 or zero and
will only add to the product if both are 1.
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
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.