Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default excel 2003-countif statement

How do I write this statement (or another appropriate one) to count the
number of entries that meet two criteria? The data is contained in two
different columns.

Example - what is the # of entries that contain the number 2 in a specific
range in column C AND the word "new" in a specific range in column D.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default excel 2003-countif statement

Using an array formula you can get the counts that you need. Type the
following formula, modifying the ranges in columns C & D as needed:

=SUM(IF((C1:C34=2)+(D1:D34="New")=2,1,0))

But don't press the Enter key, press Ctrl + Alt + Enter to make the formula
an array.

Should you modify the formula you will need to press Ctrl + Alt + Enter
after the edit to retain teh array status of the formula
--
Kevin Backmann


"confused2007" wrote:

How do I write this statement (or another appropriate one) to count the
number of entries that meet two criteria? The data is contained in two
different columns.

Example - what is the # of entries that contain the number 2 in a specific
range in column C AND the word "new" in a specific range in column D.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default excel 2003-countif statement

Another version:

=sumproduct(--(c1:c10=2),--(d1:d10="new"))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

confused2007 wrote:

How do I write this statement (or another appropriate one) to count the
number of entries that meet two criteria? The data is contained in two
different columns.

Example - what is the # of entries that contain the number 2 in a specific
range in column C AND the word "new" in a specific range in column D.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default excel 2003-countif statement

Hey Dave, thanks for the link. I was able to read about the SUMPRODUCT
function without my eyes glazing over. Great information...
--
Kevin Backmann


"Dave Peterson" wrote:

Another version:

=sumproduct(--(c1:c10=2),--(d1:d10="new"))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

confused2007 wrote:

How do I write this statement (or another appropriate one) to count the
number of entries that meet two criteria? The data is contained in two
different columns.

Example - what is the # of entries that contain the number 2 in a specific
range in column C AND the word "new" in a specific range in column D.


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default excel 2003-countif statement

MEGO?

Sounds like a problem with every meeting I've attended.

Kevin B wrote:

Hey Dave, thanks for the link. I was able to read about the SUMPRODUCT
function without my eyes glazing over. Great information...
--
Kevin Backmann

"Dave Peterson" wrote:

Another version:

=sumproduct(--(c1:c10=2),--(d1:d10="new"))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

confused2007 wrote:

How do I write this statement (or another appropriate one) to count the
number of entries that meet two criteria? The data is contained in two
different columns.

Example - what is the # of entries that contain the number 2 in a specific
range in column C AND the word "new" in a specific range in column D.


--

Dave Peterson


--

Dave Peterson
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
Countif within and if statement Amber Excel Worksheet Functions 2 July 30th 07 06:05 PM
COUNTIF for criteria in two separate columns (Excel 2003) Mimi Excel Worksheet Functions 5 January 11th 07 09:06 PM
If Statement with Countif Crazyhorse Excel Discussion (Misc queries) 3 April 10th 06 08:55 PM
COUNTIF Bug in Excel 2003 byundt Excel Worksheet Functions 5 July 22nd 05 03:51 PM
WHERE IS COUNTIF IN EXCEL 2003 Nimrod Excel Worksheet Functions 3 November 19th 04 02:46 AM


All times are GMT +1. The time now is 01:03 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"