ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Count function? (https://www.excelbanter.com/excel-programming/410694-count-function.html)

Zakynthos

Count function?
 
If Col A contains a text variable and column B contains a numerical variable
associated with the text variable, what is the simplest formula I can put
into a single cell that will count the number of occurrences of the numerical
variables in Col B associated with the text variable in A?

Gary''s Student

Count function?
 
For example:

dog 3
cat 2
bat 3
rat 1
hat 1
dog 1
cat 1
bat 2
rat 2
hat 2
dog 3
cat 3
bat 2
rat 3
hat 3

=SUMPRODUCT(--(A1:A15="dog"),--(B1:B15=3))
will return a 2
--
Gary''s Student - gsnu200785


"Zakynthos" wrote:

If Col A contains a text variable and column B contains a numerical variable
associated with the text variable, what is the simplest formula I can put
into a single cell that will count the number of occurrences of the numerical
variables in Col B associated with the text variable in A?



All times are GMT +1. The time now is 09:05 PM.

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