#1   Report Post  
Posted to microsoft.public.excel.misc
Sue Sue is offline
external usenet poster
 
Posts: 285
Default Countif

Need help with a fomula to count how many times Column D has a value of 0 if
column C is equal to 16.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Countif

Try:

=SUMPRODUCT((D1:D1000<"")*(D1:D1000=0)*(C1:C1000= 16))

Adjust the rage to suit but not that you can't use whole columns.

--
HTH

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


Replace @mailinator.com with @tiscali.co.uk


"Sue" wrote in message
...
Need help with a fomula to count how many times Column D has a value of 0
if
column C is equal to 16.



  #3   Report Post  
Posted to microsoft.public.excel.misc
Sue Sue is offline
external usenet poster
 
Posts: 285
Default Countif


My 16 is coming from my data source as a text 16 I tried this
=SUMPRODUCT((D1:D1000<"")*(D1:D1000=0)*(C1:C1000= "16"))
but it did not find any and should have found 106
"Sandy Mann" wrote:

Try:

=SUMPRODUCT((D1:D1000<"")*(D1:D1000=0)*(C1:C1000= 16))

Adjust the rage to suit but not that you can't use whole columns.

--
HTH

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


Replace @mailinator.com with @tiscali.co.uk


"Sue" wrote in message
...
Need help with a fomula to count how many times Column D has a value of 0
if
column C is equal to 16.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 353
Default Countif

Perhaps your 16 includes spaces. If they are all the same, you could include
the spaces in sumproduct, or you could use the trim function to remove the
spaces, or use paste special to multiply column c by 1 to convert to a number.

=SUMPRODUCT((D1:D1000=0)*(C1:C1000="16 "))
if your cell contains 16 followed by two spaces

=SUMPRODUCT(--(D2:D1000=0),--(C2:C1000="16"))
if your cell contains only 16 in text format

=SUMPRODUCT(--(D2:D1000=0),--(C2:C1000=16))
if you convert 16 to number

You would want to do the same sort of adjustments if it's possible the 0 is
not an actual zero as well...
good luck!

"Sue" wrote:


My 16 is coming from my data source as a text 16 I tried this
=SUMPRODUCT((D1:D1000<"")*(D1:D1000=0)*(C1:C1000= "16"))
but it did not find any and should have found 106
"Sandy Mann" wrote:

Try:

=SUMPRODUCT((D1:D1000<"")*(D1:D1000=0)*(C1:C1000= 16))

Adjust the rage to suit but not that you can't use whole columns.

--
HTH

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


Replace @mailinator.com with @tiscali.co.uk


"Sue" wrote in message
...
Need help with a fomula to count how many times Column D has a value of 0
if
column C is equal to 16.




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 353
Default Countif

I'm sorry, I did not mean to switch formats on you half way thru... was
trying to stick with the original post, but got interupted and forgot when I
came back...

So just FYI -
=SUMPRODUCT((D1:D1000=0)*(C1:C1000="16"))
and
=SUMPRODUCT(--(D2:D1000=0),--(C2:C1000="16"))
will give you the same results.

"Sue" wrote:


My 16 is coming from my data source as a text 16 I tried this
=SUMPRODUCT((D1:D1000<"")*(D1:D1000=0)*(C1:C1000= "16"))
but it did not find any and should have found 106
"Sandy Mann" wrote:

Try:

=SUMPRODUCT((D1:D1000<"")*(D1:D1000=0)*(C1:C1000= 16))

Adjust the rage to suit but not that you can't use whole columns.

--
HTH

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


Replace @mailinator.com with @tiscali.co.uk


"Sue" wrote in message
...
Need help with a fomula to count how many times Column D has a value of 0
if
column C is equal to 16.






  #7   Report Post  
Posted to microsoft.public.excel.misc
Sue Sue is offline
external usenet poster
 
Posts: 285
Default Countif


Thanks so much, that works, found I also had a problem in formula prior to
this where I will telling it to return a value of 0 if it did not find a
match and my 0 was not formatted properly. Thanks again

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
Help with a COUNTIF, Please Marty Excel Worksheet Functions 13 May 23rd 05 12:14 AM
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 11:45 PM.

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"