Group:  Microsoft Excel ยป microsoft.public.excel
Thread: Count cells in range

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Count cells in range
Eric 30.09.2006 16:34:01
I need a function that simply counts the number of cells in a range. Not
based on a condtion, simply the number of cells in a range.

Obviously if I'm doing this once I can simply put in a constant. (It's easy
to see that the range A1:A50 has 50 cells.) But I need a formula that will
automatically adjust if the size of the range changes, so that if I insert a
row after A17, the formula will return 51.

As far as I can tell, COUNT, COUNTA, and COUNTIF don't do this. I suppose I
could use COUNTIF(A1:A50,"<>999"), where 999 is a value that I know will not
appear in the range.

But is there a more straightforward formula?

Thanks.
Re: Count cells in range
Dave Peterson <petersod[ at ]verizonXSPAM.net> 30.09.2006 16:41:52
If it's a single area, how about:
=rows(myrng)*columns(myrng)

Eric wrote:
[Quoted Text]
>
> I need a function that simply counts the number of cells in a range. Not
> based on a condtion, simply the number of cells in a range.
>
> Obviously if I'm doing this once I can simply put in a constant. (It's easy
> to see that the range A1:A50 has 50 cells.) But I need a formula that will
> automatically adjust if the size of the range changes, so that if I insert a
> row after A17, the formula will return 51.
>
> As far as I can tell, COUNT, COUNTA, and COUNTIF don't do this. I suppose I
> could use COUNTIF(A1:A50,"<>999"), where 999 is a value that I know will not
> appear in the range.
>
> But is there a more straightforward formula?
>
> Thanks.

--

Dave Peterson
Re: Count cells in range
"Don Guillett" <dguillett1[ at ]austin.rr.com> 30.09.2006 16:51:48
=CELL("row",B11)-CELL("row",B2)

--
Don Guillett
SalesAid Software
dguillett1[ at ]austin.rr.com
"Eric" <Eric[ at ]discussions.microsoft.com> wrote in message
news:6E57EB22-59EB-45CE-818F-C3780F1FE33B[ at ]microsoft.com...
[Quoted Text]
>I need a function that simply counts the number of cells in a range. Not
> based on a condtion, simply the number of cells in a range.
>
> Obviously if I'm doing this once I can simply put in a constant. (It's
> easy
> to see that the range A1:A50 has 50 cells.) But I need a formula that
> will
> automatically adjust if the size of the range changes, so that if I insert
> a
> row after A17, the formula will return 51.
>
> As far as I can tell, COUNT, COUNTA, and COUNTIF don't do this. I suppose
> I
> could use COUNTIF(A1:A50,"<>999"), where 999 is a value that I know will
> not
> appear in the range.
>
> But is there a more straightforward formula?
>
> Thanks.


Re: Count cells in range
Eric 30.09.2006 17:04:01
Thanks. That solves the problem.

I'm an occasional user of Excel, and I just don't know all the functions. I
knew there had to be some simple solution!

"Dave Peterson" wrote:

[Quoted Text]
> If it's a single area, how about:
> =rows(myrng)*columns(myrng)
>
> Eric wrote:
> >
> > I need a function that simply counts the number of cells in a range. Not
> > based on a condtion, simply the number of cells in a range.
> >
> > Obviously if I'm doing this once I can simply put in a constant. (It's easy
> > to see that the range A1:A50 has 50 cells.) But I need a formula that will
> > automatically adjust if the size of the range changes, so that if I insert a
> > row after A17, the formula will return 51.
> >
> > As far as I can tell, COUNT, COUNTA, and COUNTIF don't do this. I suppose I
> > could use COUNTIF(A1:A50,"<>999"), where 999 is a value that I know will not
> > appear in the range.
> >
> > But is there a more straightforward formula?
> >
> > Thanks.
>
> --
>
> Dave Peterson
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net