ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   countif - I want to enter 2 parameters - how? (https://www.excelbanter.com/excel-programming/352190-countif-i-want-enter-2-parameters-how.html)

NancyP192

countif - I want to enter 2 parameters - how?
 
I have a spreadsheet where I want a total if the # is 9 and <20. How do I
write this?

Toppers

countif - I want to enter 2 parameters - how?
 
Hi,

This will give SUM of value 9 and < 20. Replacing SUMIF with COUNTIF will
give count of entries 9 and < 20

=SUMIF($A$1:$A$50,"9")-SUMIF($A$1:$A$50,"=20")

hth

"NancyP192" wrote:

I have a spreadsheet where I want a total if the # is 9 and <20. How do I
write this?


Jim Thomlinson[_5_]

countif - I want to enter 2 parameters - how?
 
You can use sumproduct something like this

=SUMPRODUCT((A2:A509)*(A2:A50<20))

Here is a link to everything you ever wanted to know about sumproduct. It is
a very useful function...

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
HTH...

Jim Thomlinson


"NancyP192" wrote:

I have a spreadsheet where I want a total if the # is 9 and <20. How do I
write this?



All times are GMT +1. The time now is 01:47 AM.

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