Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Counting number of rows based on mutiple criteria

Does anyone know how to count the number of rows based on mutiple criteria on
other columns? For example I want to count the number row that meet the
criteria of "Yes" in Col 2 and "Yes" in Col 3. The result would be 2 in the
example below. I tried different combinations of Vlookup, Countif and Sumif
and could not come up with anything that worked.

Col 1 Col2 Col3
A Yes No
B Yes Yes
C No No
D No Yes
E Yes Yes

Your help is greatly appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Counting number of rows based on mutiple criteria

Hi,

=SUMPRODUCT((B1:B10="Yes")*(C1:C10="Yes"))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Matt Brewer" wrote:

Does anyone know how to count the number of rows based on mutiple criteria on
other columns? For example I want to count the number row that meet the
criteria of "Yes" in Col 2 and "Yes" in Col 3. The result would be 2 in the
example below. I tried different combinations of Vlookup, Countif and Sumif
and could not come up with anything that worked.

Col 1 Col2 Col3
A Yes No
B Yes Yes
C No No
D No Yes
E Yes Yes

Your help is greatly appreciated!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Counting number of rows based on mutiple criteria

You can use DCOUNTA. It's a little different than using the other functions.
Please see the example below. DCOUNTA makes it easy to look up different
criteria.

Ex.
This would be the data
Apples(A1) Oranges(B1)
yes yes
yes no
no yes

Now we create a lookup table. Either on the same tab or another enter the
column headers and any data entered under those headers will be the criteria
for the function.

Apples(D1) Oranges(E1)
Yes Yes

Now enter the DCOUNTA formula into another cell
=DCOUNTA(A1:B4,"Apples",D1:E2)

This will bring a count of 1. If the "yes" under Oranges is deleted the
result will be 2.

I hope this helps.


"Matt Brewer" wrote:

Does anyone know how to count the number of rows based on mutiple criteria on
other columns? For example I want to count the number row that meet the
criteria of "Yes" in Col 2 and "Yes" in Col 3. The result would be 2 in the
example below. I tried different combinations of Vlookup, Countif and Sumif
and could not come up with anything that worked.

Col 1 Col2 Col3
A Yes No
B Yes Yes
C No No
D No Yes
E Yes Yes

Your help is greatly appreciated!

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 the number of rows based on the color Gan Excel Discussion (Misc queries) 2 November 3rd 09 05:18 PM
Counting number of rows between date range and meeting 2 string criteria Hii Sing Chung Excel Worksheet Functions 11 July 21st 09 12:34 AM
Count/Sum based on mutiple criteria Jon Dow[_2_] Excel Worksheet Functions 4 September 16th 08 07:56 PM
Copy rows of one sheet into mutiple sheets based on column value Wesley Breshears Excel Discussion (Misc queries) 0 October 18th 06 03:19 PM
Counting rows based on criteria in multiple cells Margaret Excel Discussion (Misc queries) 11 December 2nd 04 11:04 PM


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