Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default countif formula accross two columns

I have two coulumns with values. i want to count number of records which are
more than 0 in both columns. E.g:
Column A Coulumn B
0 0
5 6
0 1
3 2

Therefore I want the answer to come back as 2 as two rows have both columns
with a value of more than 0.

thanks
Afsha
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default countif formula accross two columns

Hi,

Perfect for a sumproduct function:

=SUMPRODUCT((A1:A100)*(B1:B100))

Cheers!
Jean-Guy

"Afsha" wrote:

I have two coulumns with values. i want to count number of records which are
more than 0 in both columns. E.g:
Column A Coulumn B
0 0
5 6
0 1
3 2

Therefore I want the answer to come back as 2 as two rows have both columns
with a value of more than 0.

thanks
Afsha

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default countif formula accross two columns

Another way to write it:
=SUMPRODUCT(--(A1:A40), --(B1:B40))

but pinmaster's is shorter and both give the same result.

"Afsha" wrote:

I have two coulumns with values. i want to count number of records which are
more than 0 in both columns. E.g:
Column A Coulumn B
0 0
5 6
0 1
3 2

Therefore I want the answer to come back as 2 as two rows have both columns
with a value of more than 0.

thanks
Afsha

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default countif formula accross two columns

thank you both!

"JLatham" wrote:

Another way to write it:
=SUMPRODUCT(--(A1:A40), --(B1:B40))

but pinmaster's is shorter and both give the same result.

"Afsha" wrote:

I have two coulumns with values. i want to count number of records which are
more than 0 in both columns. E.g:
Column A Coulumn B
0 0
5 6
0 1
3 2

Therefore I want the answer to come back as 2 as two rows have both columns
with a value of more than 0.

thanks
Afsha

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
Locking all cells accross when sorting columns David New Users to Excel 2 September 9th 06 09:26 PM
CountIf formula results in the formula itself being displayed. NewKid Excel Worksheet Functions 9 December 21st 05 11:10 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
I have a question regarding countif formula. Fahad Farid Ansari Excel Worksheet Functions 6 October 1st 05 11:57 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


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

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"