ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   counting the number of two different variables (https://www.excelbanter.com/excel-discussion-misc-queries/193474-counting-number-two-different-variables.html)

nick

counting the number of two different variables
 
I have a speadsheet with several tabs that I need to count two variables on
different pages. Simply, there is one (1) summary page and one (1) page I
want to point the formula at. The page I need to count has 2 columns, one
contains years (2004, 2005...etc) and another column contains 2 phrases
(early term and reg term). I need to count how many times "2004 and reg term"
occur, then "2004 and early term"...and so on. Any advice?

T. Valko

counting the number of two different variables
 
Try this:

=SUMPRODUCT(--(Sheet2!A1:A100=2004),--(Sheet2!B1:B100="reg term"))

Better to use cells to hold the criteria:

D1 = 2004
E1 = reg term

=SUMPRODUCT(--(Sheet2!A1:A100=D1),--(Sheet2!B1:B100=E1))

Adjust ranges/sheet name to suit.

--
Biff
Microsoft Excel MVP


"Nick" wrote in message
...
I have a speadsheet with several tabs that I need to count two variables on
different pages. Simply, there is one (1) summary page and one (1) page I
want to point the formula at. The page I need to count has 2 columns, one
contains years (2004, 2005...etc) and another column contains 2 phrases
(early term and reg term). I need to count how many times "2004 and reg
term"
occur, then "2004 and early term"...and so on. Any advice?





All times are GMT +1. The time now is 08:21 PM.

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