PC Review


Reply
Thread Tools Rate Thread

Count Number of Cells in a Range

 
 
TKrepitch@aol.com
Guest
Posts: n/a
 
      3rd Jun 2006
I know the best answer to this question is to use a pivot table, but
it's not my file - I'm just trying to help someone out here.

There is a table that lists a category from B6:B26 and the months from
C5:N5. Within B6:B26, there are four different possibilities (say A,
B, C and D).

What we need to do is write an equation that will tell us how many As,
Bs, Cs and Ds there are in each month, but only if the number in the
table is greater than zero.

I guess it would be something like a COUNTIFWHERE function, if that
were to exist. Any ideas?

Sorry if this is confusing...I'd be happy to clarify if I can.

 
Reply With Quote
 
 
 
 
Biff
Guest
Posts: n/a
 
      3rd Jun 2006
Hi!

>I know the best answer to this question is to use a pivot table


The amount of time it takes you to create a pivot table for this I could
have done it10 times with a formula! (and the resultant table looks better!)
<g>

I'm assuming the months from C5:N5 are text entries like Jan, Feb, Mar, etc.

I did it a little different. I transposed the row and column headers:


...........O..........P..........Q..........R..........S
5..................Cat1.....Cat2.....Cat3.....Cat4
6......Jan
7......Feb
8......Mar
9......Apr
...
17....Dec

Enter this formula in P6:

=SUMPRODUCT(($B$6:$B$26=P$5)*($C$5:$N$5=$O6)*($C$6:$N$26>0))

Copy across to S6 then down to row 17.

Biff

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I know the best answer to this question is to use a pivot table, but
> it's not my file - I'm just trying to help someone out here.
>
> There is a table that lists a category from B6:B26 and the months from
> C5:N5. Within B6:B26, there are four different possibilities (say A,
> B, C and D).
>
> What we need to do is write an equation that will tell us how many As,
> Bs, Cs and Ds there are in each month, but only if the number in the
> table is greater than zero.
>
> I guess it would be something like a COUNTIFWHERE function, if that
> were to exist. Any ideas?
>
> Sorry if this is confusing...I'd be happy to clarify if I can.
>



 
Reply With Quote
 
TKrepitch@aol.com
Guest
Posts: n/a
 
      5th Jun 2006
Thanks, Biff! That is very slick.

Biff wrote:
> Hi!
>
> >I know the best answer to this question is to use a pivot table

>
> The amount of time it takes you to create a pivot table for this I could
> have done it10 times with a formula! (and the resultant table looks better!)
> <g>
>
> I'm assuming the months from C5:N5 are text entries like Jan, Feb, Mar, etc.
>
> I did it a little different. I transposed the row and column headers:
>
>
> ..........O..........P..........Q..........R..........S
> 5..................Cat1.....Cat2.....Cat3.....Cat4
> 6......Jan
> 7......Feb
> 8......Mar
> 9......Apr
> ..
> 17....Dec
>
> Enter this formula in P6:
>
> =SUMPRODUCT(($B$6:$B$26=P$5)*($C$5:$N$5=$O6)*($C$6:$N$26>0))
>
> Copy across to S6 then down to row 17.
>
> Biff
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I know the best answer to this question is to use a pivot table, but
> > it's not my file - I'm just trying to help someone out here.
> >
> > There is a table that lists a category from B6:B26 and the months from
> > C5:N5. Within B6:B26, there are four different possibilities (say A,
> > B, C and D).
> >
> > What we need to do is write an equation that will tell us how many As,
> > Bs, Cs and Ds there are in each month, but only if the number in the
> > table is greater than zero.
> >
> > I guess it would be something like a COUNTIFWHERE function, if that
> > were to exist. Any ideas?
> >
> > Sorry if this is confusing...I'd be happy to clarify if I can.
> >


 
Reply With Quote
 
Biff
Guest
Posts: n/a
 
      5th Jun 2006
You're welcome. Thanks for the feedback!

Biff

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks, Biff! That is very slick.
>
> Biff wrote:
>> Hi!
>>
>> >I know the best answer to this question is to use a pivot table

>>
>> The amount of time it takes you to create a pivot table for this I could
>> have done it10 times with a formula! (and the resultant table looks
>> better!)
>> <g>
>>
>> I'm assuming the months from C5:N5 are text entries like Jan, Feb, Mar,
>> etc.
>>
>> I did it a little different. I transposed the row and column headers:
>>
>>
>> ..........O..........P..........Q..........R..........S
>> 5..................Cat1.....Cat2.....Cat3.....Cat4
>> 6......Jan
>> 7......Feb
>> 8......Mar
>> 9......Apr
>> ..
>> 17....Dec
>>
>> Enter this formula in P6:
>>
>> =SUMPRODUCT(($B$6:$B$26=P$5)*($C$5:$N$5=$O6)*($C$6:$N$26>0))
>>
>> Copy across to S6 then down to row 17.
>>
>> Biff
>>
>> <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >I know the best answer to this question is to use a pivot table, but
>> > it's not my file - I'm just trying to help someone out here.
>> >
>> > There is a table that lists a category from B6:B26 and the months from
>> > C5:N5. Within B6:B26, there are four different possibilities (say A,
>> > B, C and D).
>> >
>> > What we need to do is write an equation that will tell us how many As,
>> > Bs, Cs and Ds there are in each month, but only if the number in the
>> > table is greater than zero.
>> >
>> > I guess it would be something like a COUNTIFWHERE function, if that
>> > were to exist. Any ideas?
>> >
>> > Sorry if this is confusing...I'd be happy to clarify if I can.
>> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count the number of cells containing a date within a range Scoffers Microsoft Excel Misc 5 24th Feb 2009 10:00 AM
count number of cells in range showing between 320 and 345 =?Utf-8?B?YW5uaWVhbmR0aWth?= Microsoft Excel Worksheet Functions 6 25th Jun 2006 02:43 AM
count the number of new lows within a range of cells jbesr1230 Microsoft Excel Discussion 2 1st Jun 2006 03:43 PM
count the number of nonblank cells within a range =?Utf-8?B?SGVydmluZGVy?= Microsoft Excel Programming 1 9th May 2006 03:37 PM
Count number of cells in a range with amount > 0 mikeburg Microsoft Excel Programming 7 14th Jul 2005 12:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:20 AM.