LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default count rows that meet two criteria in two different columns?

=SUMIF('Data Record'!C:C,"Name",'Data Record'!I:I)
I need the formula to say: For every row that contains "NAME" in column C
and contains "0" in column J, add 1.


In C1: =SUMPRODUCT((A1:A20="Name1")*(B1:B20=0))


The earlier SUMPRODUCT should have worked (when adapted to suit your
layout), but we can't use entire col refs in SUMPRODUCT, unlike SUMIF. I
should have mentioned this in the earlier response, sorry.

Try something like this:
=SUMPRODUCT(('Data Record'!C2:C1000="Name")*('Data Record'!I2:I1000=0))

Adapt the ranges to suit. The ranges involved should be identical in size.
As stated earlier, use the smallest range sufficient to cover the max
expected extent of data in cols C and I. This is to keep performance optimal
/ tolerable* (calc speed).
*albeit this would be accepted, don't use eg: 'Data Record'!C2:C65536
when data is expected only up to, say row 2000
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"dsk3808" wrote:
Thanks for the response guys, but I'm not sure that either one does the job
I'm looking to do.

Basically, I need to use the SUMIF function with two criteria. Here is an
example of my current SUMIF functions:

=SUMIF('Data Record'!C:C,"Name",'Data Record'!I:I)

Which means that for every row in column C that contains "NAME" add in the
corresponding cell from column I.

What I need to do is expand that by one criteria.

I need the formula to say: For every row that contains "NAME" in column C
and contains "0" in column J, add 1.

Basically, I need a count function based on two criteria.
1) column contains a specific name AND
2) column J contains the number "0"



 
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 count the numbers of row that meet 2 criteria Debi Excel Worksheet Functions 4 November 10th 05 09:56 PM
count records which meet filter criteria AKH Excel Discussion (Misc queries) 1 October 31st 05 03:54 PM
How to swap rows and columns? [email protected] Excel Discussion (Misc queries) 5 September 21st 05 08:07 AM
Delete Rows where cells does not meet criteria Danny Excel Worksheet Functions 1 September 12th 05 05:08 PM
Function to Count Number of Consecutive Rows with a Specific Criteria? Templee1 Excel Worksheet Functions 2 July 10th 05 10:22 PM


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