شنبه هجدهم مرداد ۱۳۹۹ - 0:56 - حسين حسين پور -
Count cells equal to
Generic formula
=COUNTIF(range,value)
Explanation
To count the number of cells equal to a specific value, you can use the COUNTIF function. In the example shown, G6 contains this formula:
=COUNTIF(D5:D11,"red")
How this formula works
The COUNTIF function is fully automatic — it counts the number of cells in a range that match the supplied criteria.
For range, we use D5:D11, which contains colors. For criteria, we simply use "red".
COUNTIF returns the count of values in D5:D11 that are equal to "red".