nonadjacent selections

S

schillm228

Why can't I use nonadjacent selections as a range in the =COUNTIF formula?

For example: =COUNTIF(FirstGroup,E53)
where FirstGroup is a nonadjacent selection of cells A10:A20 G10:G20
 
D

Domenic

Here's one way...

=SUMPRODUCT(--(CHOOSE({1,2},A10:A20,G10:G20)=E53))

Hope this helps!
 
D

Don Guillett

try this idea
=SUMPRODUCT(COUNTIF(INDIRECT({"a2:a22","c2:c22"}),"=ff"))
=SUMPRODUCT(COUNTIF(INDIRECT({"a2:a22","c2:c22"}),E7))
 
H

Harlan Grove

Domenic wrote...
Here's one way...

=SUMPRODUCT(--(CHOOSE({1,2},A10:A20,G10:G20)=E53))

I'd figure the OP wants to use the defined name FirstGroup. Your
formula could be rewritten as

=SUMPRODUCT(--(CHOOSE({1,2},INDEX(FirstGroup,0,0,1),
INDEX(FirstGroup,0,0,2))=E53))

However, for counting, there's a more compact solution: FREQUENCY.

=INDEX(FREQUENCY(FirstGroup,E53*{0.99999999999999;1}),2)
 
D

Domenic

I'd figure the OP wants to use the defined name FirstGroup.

Very true...
However, for counting, there's a more compact solution: FREQUENCY.

=INDEX(FREQUENCY(FirstGroup,E53*{0.99999999999999;1}),2)

Nice one Harlan!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top