#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Countif?

(please forgive me if this is a duplicate posting...)

I'm trying to do the following:

Count how many cells (rows) in column A that has the value 1 in Column C AND
value 1 in Column D?

Any suggestions?

Helen


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Countif?

So ... what does Column A have to do with the count?
=Sumproduct((C1:C100=1)*(D1:D100=1))

Do you want to check if the cell in Column A contains *anything?
=Sumproduct((C1:C100=1)*(D1:D100=1)*(A1:A100<""))

OR ... if Column A is *not* equal to 0?
=Sumproduct((C1:C100=1)*(D1:D100=1)*(A1:A1000))


--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Helen" wrote in message
...
(please forgive me if this is a duplicate posting...)

I'm trying to do the following:

Count how many cells (rows) in column A that has the value 1 in Column C
AND value 1 in Column D?

Any suggestions?

Helen



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Countif?

What happens when Column C contains a 1, and Column D contains a 2 and/or a
3?
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Sandy Mann" wrote in message
...
If this is a real problem not just an example, (ie that there really will

be
1's used), then a simple SUMIF() should do it:

=SUMIF(A1:A10,1,C1:C10)

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Ragdyer" wrote in message
...
So ... what does Column A have to do with the count?
=Sumproduct((C1:C100=1)*(D1:D100=1))

Do you want to check if the cell in Column A contains *anything?
=Sumproduct((C1:C100=1)*(D1:D100=1)*(A1:A100<""))

OR ... if Column A is *not* equal to 0?
=Sumproduct((C1:C100=1)*(D1:D100=1)*(A1:A1000))


--
HTH,

RD


--------------------------------------------------------------------------

-
Please keep all correspondence within the NewsGroup, so all may benefit

!

--------------------------------------------------------------------------

-
"Helen" wrote in message
...
(please forgive me if this is a duplicate posting...)

I'm trying to do the following:

Count how many cells (rows) in column A that has the value 1 in Column

C
AND value 1 in Column D?

Any suggestions?

Helen






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Countif?

Helen,

You can only use COUNTIF (and SUMIF) when you have one condition - for
multiple conditions you need to use SUMPRODUCT, like so:

=SUMPRODUCT((C1:C100=1)*(D1:D100=1))

if you just want to count them, or this:

=SUMPRODUCT((C1:C100=1)*(D1:D100=1)*(A1:A100))

if you want to add them up.

Hope this helps.

Pete

On Mar 7, 8:23 pm, "Helen" wrote:
(please forgive me if this is a duplicate posting...)

I'm trying to do the following:

Count how many cells (rows) in column A that has the value 1 in Column C AND
value 1 in Column D?

Any suggestions?

Helen





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF Jane Excel Worksheet Functions 4 March 18th 05 11:15 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


All times are GMT +1. The time now is 10:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"