countif with two sets of non consectutive ranges at the same time

G

Gover

I need to count how many times 10 appears in a row. but the row has been
split up. the data is in a1:f1 then more in m1:z1. the countif function
will not let me have more than one consectuive stretch for its range.

any suggestions
 
B

Bob Phillips

So issue separate COUNTIFs for each range.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
J

joeu2004

I need to count how many times 10 appears in a row. but the row has been
split up. the data is in a1:f1 then more in m1:z1. the countif function
will not let me have more than one consectuive stretch for its range.

any suggestions

And why doesn't the union reference operator work in this context?

=COUNTIF((A1:F1,M1:Z1),"=10")
 
T

Teethless mama

If you have XL-2007
use COUNTIFS function. It's more elegant than COUNTIF(rng1)+COUNTIF(rng2)
 
G

Gover

i tried this and in fact copied your formula, but the result gave me a value
error.

i infact got around it by two sepaerate countif and +'d then together to
give my result
but thanks anyway
 
G

Gover

this worked, i was trying to be too clever i suppose by trying to do them
together rather than two seperate countif's
thanks
 
J

joeu2004

i tried this and in fact copied your formula, but the result gave me a value
error.

Yes, I know. That's why I asked the question. But now I see the
ambiguity of my phrasing in this context. You might have read it as a
sarcastic way of asking why that does not work for __you__ -- that is,
why you don't use that solution. That was not my intention. Sorry
for the confusion.
 
Top