ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Count rows based on multiple variables (https://www.excelbanter.com/excel-programming/314836-count-rows-based-multiple-variables.html)

Murph

Count rows based on multiple variables
 
I'm having trouble figuring out a way to count specific rows in a database I
have, using multiple variables. For example. I have column A, B, and C. In
column "A" are number values from 1-10. In Column "B" are peoples names, and
in Column "C" are other text values. I want to figure out a way to count all
the rows that have the numbers 1-3 in column "A", the same name in column
"B", and the same text value in column "C". I've tried using multiple
variations of the COUNT, DCOUNT, SUM, and DSUM functions but have had no
luck. Any help would be appreciated.
--
Brendan

Don[_18_]

Count rows based on multiple variables
 
Murph

Try:
=SUMPRODUCT((B1:B10="Jones")*(C1:C10="Feb")*(A1:A1 0=1)*(A1:A10<=3))


Don Pistulka

"Murph" wrote in message
...
I'm having trouble figuring out a way to count specific rows in a database
I
have, using multiple variables. For example. I have column A, B, and C.
In
column "A" are number values from 1-10. In Column "B" are peoples names,
and
in Column "C" are other text values. I want to figure out a way to count
all
the rows that have the numbers 1-3 in column "A", the same name in column
"B", and the same text value in column "C". I've tried using multiple
variations of the COUNT, DCOUNT, SUM, and DSUM functions but have had no
luck. Any help would be appreciated.
--
Brendan




Myrna Larson

Count rows based on multiple variables
 
You say "the same". Do you intend to specify what that name and text is, or is
the formula supposed to just count duplicates based on columns B and C where A
is between 1 and 10?


On Tue, 26 Oct 2004 17:41:01 -0700, "Murph"
wrote:

I'm having trouble figuring out a way to count specific rows in a database I
have, using multiple variables. For example. I have column A, B, and C. In
column "A" are number values from 1-10. In Column "B" are peoples names, and
in Column "C" are other text values. I want to figure out a way to count all
the rows that have the numbers 1-3 in column "A", the same name in column
"B", and the same text value in column "C". I've tried using multiple
variations of the COUNT, DCOUNT, SUM, and DSUM functions but have had no
luck. Any help would be appreciated.



Murph

Count rows based on multiple variables
 
I intend to specify what the name and text is. For example, I want to count
all the rows that have a value between 1 and 7 in Column A, a value of
"Smith" in column B, and a value of "Open" in Column C. I tried Don's
formula, but that didn't work.

"Myrna Larson" wrote:

You say "the same". Do you intend to specify what that name and text is, or is
the formula supposed to just count duplicates based on columns B and C where A
is between 1 and 10?


On Tue, 26 Oct 2004 17:41:01 -0700, "Murph"
wrote:

I'm having trouble figuring out a way to count specific rows in a database I
have, using multiple variables. For example. I have column A, B, and C. In
column "A" are number values from 1-10. In Column "B" are peoples names, and
in Column "C" are other text values. I want to figure out a way to count all
the rows that have the numbers 1-3 in column "A", the same name in column
"B", and the same text value in column "C". I've tried using multiple
variations of the COUNT, DCOUNT, SUM, and DSUM functions but have had no
luck. Any help would be appreciated.





All times are GMT +1. The time now is 01:24 PM.

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