ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count rows based on multiple criteria (https://www.excelbanter.com/excel-worksheet-functions/255379-count-rows-based-multiple-criteria.html)

dmg

Count rows based on multiple criteria
 
I have a need to count the number of rows in an Excel spreadsheet based on
contents of multiple cells. The formula is on one worksheet and all data is
on a second worksheet.

IE: count all rows that have the word "Windows" in column B and the word
"Complete" in column G.

Have not been able to figure this out with common functions like count,
countif, dcount, etc.

Help appreciated.
--
DMG
IT Professional

Teethless mama

Count rows based on multiple criteria
 
Search for SUMPRODUCT or SUMIFS if you use XL-2007


"dmg" wrote:

I have a need to count the number of rows in an Excel spreadsheet based on
contents of multiple cells. The formula is on one worksheet and all data is
on a second worksheet.

IE: count all rows that have the word "Windows" in column B and the word
"Complete" in column G.

Have not been able to figure this out with common functions like count,
countif, dcount, etc.

Help appreciated.
--
DMG
IT Professional


T. Valko

Count rows based on multiple criteria
 
Try one of these...

If you're using Excel 2007...

Use cells to hold the criteria:

A1 = Windows
A2 = Complete

Then:

=COUNTIFS(B1:B10,A1,G1:G10,A2)

This one will work in any version of Excl:

=SUMPRODUCT(--(B1:B10=A1),--(G1:G10=A2))

--
Biff
Microsoft Excel MVP


"dmg" wrote in message
...
I have a need to count the number of rows in an Excel spreadsheet based on
contents of multiple cells. The formula is on one worksheet and all data
is
on a second worksheet.

IE: count all rows that have the word "Windows" in column B and the word
"Complete" in column G.

Have not been able to figure this out with common functions like count,
countif, dcount, etc.

Help appreciated.
--
DMG
IT Professional




Glenn

Count rows based on multiple criteria
 
dmg wrote:
I have a need to count the number of rows in an Excel spreadsheet based on
contents of multiple cells. The formula is on one worksheet and all data is
on a second worksheet.

IE: count all rows that have the word "Windows" in column B and the word
"Complete" in column G.

Have not been able to figure this out with common functions like count,
countif, dcount, etc.

Help appreciated.



Try this:

http://www.contextures.com/xlFunctio...tml#SumProduct


All times are GMT +1. The time now is 11:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com