ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   countif with two sets of non consectutive ranges at the same time (https://www.excelbanter.com/excel-worksheet-functions/158155-countif-two-sets-non-consectutive-ranges-same-time.html)

Gover

countif with two sets of non consectutive ranges at the same time
 
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


Bob Phillips

countif with two sets of non consectutive ranges at the same time
 
So issue separate COUNTIFs for each range.

--
HTH

Bob

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

"Gover" wrote in message
...
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




joeu2004

countif with two sets of non consectutive ranges at the same time
 
On Sep 13, 8:46 am, Gover wrote:
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")



David Biddulph[_2_]

countif with two sets of non consectutive ranges at the same time
 
=COUNTIF(A1:F1,10)+COUNTIF(M1:Z1,10)
--
David Biddulph

"Gover" wrote in message
...
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




Teethless mama

countif with two sets of non consectutive ranges at the same time
 
If you have XL-2007
use COUNTIFS function. It's more elegant than COUNTIF(rng1)+COUNTIF(rng2)

"Gover" wrote:

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


Gover

countif with two sets of non consectutive ranges at the same t
 
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

"joeu2004" wrote:

On Sep 13, 8:46 am, Gover wrote:
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")




Gover

countif with two sets of non consectutive ranges at the same t
 
this worked, i was trying to be too clever i suppose by trying to do them
together rather than two seperate countif's
thanks

"David Biddulph" wrote:

=COUNTIF(A1:F1,10)+COUNTIF(M1:Z1,10)
--
David Biddulph

"Gover" wrote in message
...
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





Gover

countif with two sets of non consectutive ranges at the same t
 
sorry only have 2003 - but thanks anyway

"Teethless mama" wrote:

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

"Gover" wrote:

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


joeu2004

countif with two sets of non consectutive ranges at the same t
 
On Sep 14, 2:56 am, Gover wrote:
"joeu2004" wrote:
And why doesn't the union reference operator work in this context?
=COUNTIF((A1:F1,M1:Z1),"=10")- Hide quoted text -


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.



All times are GMT +1. The time now is 02:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com