You can use SUMPRODUCT
like this:
=SUMPRODUCT(1*(name=G6))
Question
This question is an expansion on https://superuser.com/questions/601419/in-excel-how-do-i-check-if-a-cell-is-in-a-list-of-values-a-range-of-cells .
I'm trying to do =COUNTIF(name,G6)
and when name refers to some cells, it works fine, but when it refers to my constant string array it gives #VALUE!
My constant string array (using the name manager) is ={"192.168.3.2","192.168.3.10"}
... etc, and that may be my problem. But ironically, if I set cell contents to that array and reference the cells, it works fine.
Thanks
Solution
You can use SUMPRODUCT
like this:
=SUMPRODUCT(1*(name=G6))