#1   Report Post  
LucasBuck
 
Posts: n/a
Default counting problem


How could I make a function that would look at two columns of data, and
count how many have a value of zero in both cells of a row? ie
1 2
3 5
0 0
2 2
And I would get a count of 1 to display in a cell reporting how many
sets of 0 there are


--
LucasBuck
------------------------------------------------------------------------
LucasBuck's Profile: http://www.excelforum.com/member.php...o&userid=19710
View this thread: http://www.excelforum.com/showthread...hreadid=467158

  #2   Report Post  
swatsp0p
 
Posts: n/a
Default


Use the SUMPRODUCT function as such:

=SUMPRODUCT(--(A1:A100=0),--(B1:B100=0))

of course, adjust the ranges to match your data.

HTH

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=467158

  #3   Report Post  
Paul Sheppard
 
Posts: n/a
Default


LucasBuck Wrote:
How could I make a function that would look at two columns of data, and
count how many have a value of zero in both cells of a row? ie
1 2
3 5
0 0
2 2
And I would get a count of 1 to display in a cell reporting how many
sets of 0 there are


Hi LucasBuck

Assuming your example data above to be in cells A1 - B4, in c1 enter
this formula =IF(AND(A1=0,B1=0),1) and copy down to C4

When there are 2 zeros it will return 1, any other combination will
return FALSE

In C5 enter this formula =SUM(C1:C4)

If you don't want to show false change the formula to read
=IF(AND(A1=0,B1=0),1,0) in which case it will return 0 instead of false


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=467158

  #4   Report Post  
Roger Govier
 
Posts: n/a
Default

Hi Lucas

One way
=SUMPRODUCT(--(G1:G5=0),--(H1:H5=0))
Change ranges to suit

Regards

Roger Govier


LucasBuck wrote:
How could I make a function that would look at two columns of data, and
count how many have a value of zero in both cells of a row? ie
1 2
3 5
0 0
2 2
And I would get a count of 1 to display in a cell reporting how many
sets of 0 there are


  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUMPRODUCT(--(A1:A10=0),--(B1:B10=0),--(A1:A10<""))

--
HTH

Bob Phillips

"LucasBuck" wrote
in message ...

How could I make a function that would look at two columns of data, and
count how many have a value of zero in both cells of a row? ie
1 2
3 5
0 0
2 2
And I would get a count of 1 to display in a cell reporting how many
sets of 0 there are


--
LucasBuck
------------------------------------------------------------------------
LucasBuck's Profile:

http://www.excelforum.com/member.php...o&userid=19710
View this thread: http://www.excelforum.com/showthread...hreadid=467158



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
counting problem philip Excel Worksheet Functions 2 August 5th 05 12:47 AM
Problem with counting characters in a cell Tink Excel Worksheet Functions 2 June 27th 05 12:52 PM
Excel Display Problem Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 0 April 19th 05 05:25 PM
Row Autofit problem Excel 2003 Matthias Klaey Excel Discussion (Misc queries) 0 January 19th 05 05:33 PM
Counting problem again! Connie Martin Excel Worksheet Functions 2 November 2nd 04 06:14 PM


All times are GMT +1. The time now is 10:41 PM.

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

About Us

"It's about Microsoft Excel"