PC Review Forums Newsgroups Microsoft Excel Microsoft Excel Discussion Counting cells

Reply

Counting cells

 
Thread Tools Rate Thread
Old 09-11-2006, 08:02 AM   #1
Adel Handal
Guest
 
Posts: n/a
Default Counting cells


Hi,
I had this before, but it didn't work weel! I may have not made it clear.

Range C5:C29 containes either letter C or letter M.
Range D529 containes either letter M or letter F

line 5 C F
line 6 C M
line 7 M M
...........
In cell D34 I want to count the number of occurance of the combination of C
and M.
The array formula =COUNTIF(C5:C29,"C")
counts the value of colomn C.
What adjustment do I need to do to include the values in colomn D?
I tried this: =COUNTIF(C5:C29,"C"), (D529,"M")
but had an error

Khalil


  Reply With Quote
Old 09-11-2006, 08:30 AM   #2
Biff
Guest
 
Posts: n/a
Default Re: Counting cells

Try one of these:

=COUNTIF(C529,"C")+COUNTIF(C529,"M")

=SUM(COUNTIF(C529,{"C,"M"}))

Biff

"Adel Handal" <adelbhandal@hotmail.com> wrote in message
news:OawW118AHHA.1012@TK2MSFTNGP04.phx.gbl...
> Hi,
> I had this before, but it didn't work weel! I may have not made it clear.
>
> Range C5:C29 containes either letter C or letter M.
> Range D529 containes either letter M or letter F
>
> line 5 C F
> line 6 C M
> line 7 M M
> ..........
> In cell D34 I want to count the number of occurance of the combination of
> C and M.
> The array formula =COUNTIF(C5:C29,"C")
> counts the value of colomn C.
> What adjustment do I need to do to include the values in colomn D?
> I tried this: =COUNTIF(C5:C29,"C"), (D529,"M")
> but had an error
>
> Khalil
>
>



  Reply With Quote
Old 09-11-2006, 08:58 AM   #3
Adel Handal
Guest
 
Posts: n/a
Default Re: Counting cells

Hi,
Non of the worked!
They are arrya formulas.
The firsr one counted all the M's and C's in both colomns.
To be more clear I might refrase it as follows:
need to count the number of rows that has C and M in the same line in
colomns C and colomn D


"Biff" <biffinpitt@comcast.net> wrote in message
news:essv6D9AHHA.4864@TK2MSFTNGP04.phx.gbl...
> Try one of these:
>
> =COUNTIF(C529,"C")+COUNTIF(C529,"M")
>
> =SUM(COUNTIF(C529,{"C,"M"}))
>
> Biff
>
> "Adel Handal" <adelbhandal@hotmail.com> wrote in message
> news:OawW118AHHA.1012@TK2MSFTNGP04.phx.gbl...
>> Hi,
>> I had this before, but it didn't work weel! I may have not made it
>> clear.
>>
>> Range C5:C29 containes either letter C or letter M.
>> Range D529 containes either letter M or letter F
>>
>> line 5 C F
>> line 6 C M
>> line 7 M M
>> ..........
>> In cell D34 I want to count the number of occurance of the combination
>> of C and M.
>> The array formula =COUNTIF(C5:C29,"C")
>> counts the value of colomn C.
>> What adjustment do I need to do to include the values in colomn D?
>> I tried this: =COUNTIF(C5:C29,"C"), (D529,"M")
>> but had an error
>>
>> Khalil
>>
>>

>
>



  Reply With Quote
Old 09-11-2006, 09:17 AM   #4
bobocat
Guest
 
Posts: n/a
Default Re: Counting cells

=sumproduct((c5:c29="c")*(d5:d29="m"))

"Adel Handal" <adelbhandal@hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:eFJAXT9AHHA.1196@TK2MSFTNGP03.phx.gbl...
> Hi,
> Non of the worked!
> They are arrya formulas.
> The firsr one counted all the M's and C's in both colomns.
> To be more clear I might refrase it as follows:
> need to count the number of rows that has C and M in the same line in
> colomns C and colomn D
>
>
> "Biff" <biffinpitt@comcast.net> wrote in message
> news:essv6D9AHHA.4864@TK2MSFTNGP04.phx.gbl...
>> Try one of these:
>>
>> =COUNTIF(C529,"C")+COUNTIF(C529,"M")
>>
>> =SUM(COUNTIF(C529,{"C,"M"}))
>>
>> Biff
>>
>> "Adel Handal" <adelbhandal@hotmail.com> wrote in message
>> news:OawW118AHHA.1012@TK2MSFTNGP04.phx.gbl...
>>> Hi,
>>> I had this before, but it didn't work weel! I may have not made it
>>> clear.
>>>
>>> Range C5:C29 containes either letter C or letter M.
>>> Range D529 containes either letter M or letter F
>>>
>>> line 5 C F
>>> line 6 C M
>>> line 7 M M
>>> ..........
>>> In cell D34 I want to count the number of occurance of the combination
>>> of C and M.
>>> The array formula =COUNTIF(C5:C29,"C")
>>> counts the value of colomn C.
>>> What adjustment do I need to do to include the values in colomn D?
>>> I tried this: =COUNTIF(C5:C29,"C"), (D529,"M")
>>> but had an error
>>>
>>> Khalil
>>>
>>>

>>
>>

>
>



  Reply With Quote
Old 09-11-2006, 11:06 AM   #5
Adel Handal
Guest
 
Posts: n/a
Default Re: Counting cells

Hi,
thanks a lot . it worked fine.

"bobocat" <bobo.catgod@gmail.com> wrote in message
news:utTjvd9AHHA.3620@TK2MSFTNGP02.phx.gbl...
> =sumproduct((c5:c29="c")*(d5:d29="m"))
>
> "Adel Handal" <adelbhandal@hotmail.com>
> ¼¶¼g©ó¶l¥ó·s»D:eFJAXT9AHHA.1196@TK2MSFTNGP03.phx.gbl...
>> Hi,
>> Non of the worked!
>> They are arrya formulas.
>> The firsr one counted all the M's and C's in both colomns.
>> To be more clear I might refrase it as follows:
>> need to count the number of rows that has C and M in the same line in
>> colomns C and colomn D
>>
>>
>> "Biff" <biffinpitt@comcast.net> wrote in message
>> news:essv6D9AHHA.4864@TK2MSFTNGP04.phx.gbl...
>>> Try one of these:
>>>
>>> =COUNTIF(C529,"C")+COUNTIF(C529,"M")
>>>
>>> =SUM(COUNTIF(C529,{"C,"M"}))
>>>
>>> Biff
>>>
>>> "Adel Handal" <adelbhandal@hotmail.com> wrote in message
>>> news:OawW118AHHA.1012@TK2MSFTNGP04.phx.gbl...
>>>> Hi,
>>>> I had this before, but it didn't work weel! I may have not made it
>>>> clear.
>>>>
>>>> Range C5:C29 containes either letter C or letter M.
>>>> Range D529 containes either letter M or letter F
>>>>
>>>> line 5 C F
>>>> line 6 C M
>>>> line 7 M M
>>>> ..........
>>>> In cell D34 I want to count the number of occurance of the combination
>>>> of C and M.
>>>> The array formula =COUNTIF(C5:C29,"C")
>>>> counts the value of colomn C.
>>>> What adjustment do I need to do to include the values in colomn D?
>>>> I tried this: =COUNTIF(C5:C29,"C"), (D529,"M")
>>>> but had an error
>>>>
>>>> Khalil
>>>>
>>>>
>>>
>>>

>>
>>

>
>



  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off