A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
PS.... I wrote:
I think the #VALUE error is coming from the INDEX expression that you redacted.
But it is not the use of INDEX per se. To demonstrate the correct use of INDEX:
Formulas:
B1 (copy down): =COUNTIF(A1,"*/~**")
C1: =COUNTIF(A1:A3,"*/~**")
D1: =COUNTIF(INDEX(A1:B3,0,1),"*/~**")
E1:E3 (array-enter): =INDEX(A1:B3,0,1)
B1:B3 demonstrate the correct counting for A1:A3 individually.
C1 demonstrates the correct counting for the range A1:A3.
D1 demonstrates that COUNTIF permits the use of INDEX to return the subset range A1:A3, selected from the larger range A1:B3.
E1:E3 demonstrate that INDEX(A1:B3,0,1) correctly specifies the subset range A1:A3 by returning, in that context, the values in A1:A3.