excel - How do I count the number of times a value with a certian criteria occurs within an conditional index of cells -
i have below formula works great find percentage looking for:
=sum((countif(b12:b10002,">=9"))/(count(b12:b10002)))
what need count , countif make range conditional preceding column.
- range a12:a10000 indicates date
- range b12:b10000 indicates number between 1-10
- cell a5 indicates date
i know how many times 9 or 10 occurs in b12:b10000, if preceding cell in a12:a10000 equal a5
i have tried index match, renders "1" (meaning true) or gives me number 10 first cell in b12
any appreciated! :)
you can use countifs()
this. countif
accept multiple criteria:
=countifs(a12:a10000,a5,b12:b10000,">=9")
if using older version of excel doesn't support countifs()
can use sumproduct()
instead:
=sumproduct((a12:a10000=a5)*(b12:b10000>=9)*1)
Comments
Post a Comment