ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Countif Repeated Value in a Matrix? (https://www.excelbanter.com/excel-discussion-misc-queries/131990-countif-repeated-value-matrix.html)

Bill D. Toronto[_2_]

Countif Repeated Value in a Matrix?
 
I've got a matrix of locations. I want to count each time that the location
appears in the range.
E.g.
ETL London ETO Ottawa ETT Toronto
MTE Edmonton MTN Mountain Time North MTC Calgary
ETT Toronto ETL London CTW Winnipeg
ATF Fredericton ATC Charlottetown ATJ St John's
ATC Charlottetown ATF Fredericton ATH Halifax
ATC Charlottetown ATF Fredericton ATH Halifax

What is the best way to find out how many times that each city appears in
the list? Should I use pivot charts??? or is it an worksheet function that
will do the trick?
Many thanks,

Vergel Adriano

Countif Repeated Value in a Matrix?
 
Bill,

This doesn't seem like exactly what you're looking for, but I hope it helps.
Assuming your matrix is in A1:C6, this will give you the number of cells
with "ETL London"

=COUNTIF(A16:C18,"ETL London")




"Bill D. Toronto" wrote:

I've got a matrix of locations. I want to count each time that the location
appears in the range.
E.g.
ETL London ETO Ottawa ETT Toronto
MTE Edmonton MTN Mountain Time North MTC Calgary
ETT Toronto ETL London CTW Winnipeg
ATF Fredericton ATC Charlottetown ATJ St John's
ATC Charlottetown ATF Fredericton ATH Halifax
ATC Charlottetown ATF Fredericton ATH Halifax

What is the best way to find out how many times that each city appears in
the list? Should I use pivot charts??? or is it an worksheet function that
will do the trick?
Many thanks,


Bill D. Toronto[_2_]

Countif Repeated Value in a Matrix?
 
Thanks Vergel,

That worked well for totals. let me throw a monkey wrench into the mix.
What if I wanted to compare multiple values in the same matrix. IE what if I
wanted to count how many times Edmonton appears with Toronto on the same row?
Or let's say I've got another column to add that has nothing to do with the
locations it's merely identifying a value like Yes or No?

Let me know if you need clarification but more importantly... Thanks again!

"Vergel Adriano" wrote:

Bill,

This doesn't seem like exactly what you're looking for, but I hope it helps.
Assuming your matrix is in A1:C6, this will give you the number of cells
with "ETL London"

=COUNTIF(A16:C18,"ETL London")




"Bill D. Toronto" wrote:

I've got a matrix of locations. I want to count each time that the location
appears in the range.
E.g.
ETL London ETO Ottawa ETT Toronto
MTE Edmonton MTN Mountain Time North MTC Calgary
ETT Toronto ETL London CTW Winnipeg
ATF Fredericton ATC Charlottetown ATJ St John's
ATC Charlottetown ATF Fredericton ATH Halifax
ATC Charlottetown ATF Fredericton ATH Halifax

What is the best way to find out how many times that each city appears in
the list? Should I use pivot charts??? or is it an worksheet function that
will do the trick?
Many thanks,


Vergel Adriano

Countif Repeated Value in a Matrix?
 
Bill,

Assuming your matrix is in A1:B10 and you wanted to know how many rows have
"Edmonton" in column A and "Toronto" in column B.

=SUMPRODUCT((A1:A10="Edmonton")*(B1:B10="Toronto") *1)

You can use named ranges for A1:A10 and B1:B10. The important thing is that
your ranges are equal in size.

If you had a 3rd column that had numeric values for example and you wanted
to add another criteria to get rows where column C 100 for example, then
your formula becomes:

=SUMPRODUCT((A1:A10="Edmonton")*(B1:B10="Toronto") *(C1:C10100)*1)



"Bill D. Toronto" wrote:

Thanks Vergel,

That worked well for totals. let me throw a monkey wrench into the mix.
What if I wanted to compare multiple values in the same matrix. IE what if I
wanted to count how many times Edmonton appears with Toronto on the same row?
Or let's say I've got another column to add that has nothing to do with the
locations it's merely identifying a value like Yes or No?

Let me know if you need clarification but more importantly... Thanks again!

"Vergel Adriano" wrote:

Bill,

This doesn't seem like exactly what you're looking for, but I hope it helps.
Assuming your matrix is in A1:C6, this will give you the number of cells
with "ETL London"

=COUNTIF(A16:C18,"ETL London")




"Bill D. Toronto" wrote:

I've got a matrix of locations. I want to count each time that the location
appears in the range.
E.g.
ETL London ETO Ottawa ETT Toronto
MTE Edmonton MTN Mountain Time North MTC Calgary
ETT Toronto ETL London CTW Winnipeg
ATF Fredericton ATC Charlottetown ATJ St John's
ATC Charlottetown ATF Fredericton ATH Halifax
ATC Charlottetown ATF Fredericton ATH Halifax

What is the best way to find out how many times that each city appears in
the list? Should I use pivot charts??? or is it an worksheet function that
will do the trick?
Many thanks,


Bill D. Toronto[_2_]

Countif Repeated Value in a Matrix?
 
Thanks Vergel!
Works like a charm.

"Vergel Adriano" wrote:

Bill,

Assuming your matrix is in A1:B10 and you wanted to know how many rows have
"Edmonton" in column A and "Toronto" in column B.

=SUMPRODUCT((A1:A10="Edmonton")*(B1:B10="Toronto") *1)

You can use named ranges for A1:A10 and B1:B10. The important thing is that
your ranges are equal in size.

If you had a 3rd column that had numeric values for example and you wanted
to add another criteria to get rows where column C 100 for example, then
your formula becomes:

=SUMPRODUCT((A1:A10="Edmonton")*(B1:B10="Toronto") *(C1:C10100)*1)



"Bill D. Toronto" wrote:

Thanks Vergel,

That worked well for totals. let me throw a monkey wrench into the mix.
What if I wanted to compare multiple values in the same matrix. IE what if I
wanted to count how many times Edmonton appears with Toronto on the same row?
Or let's say I've got another column to add that has nothing to do with the
locations it's merely identifying a value like Yes or No?

Let me know if you need clarification but more importantly... Thanks again!

"Vergel Adriano" wrote:

Bill,

This doesn't seem like exactly what you're looking for, but I hope it helps.
Assuming your matrix is in A1:C6, this will give you the number of cells
with "ETL London"

=COUNTIF(A16:C18,"ETL London")




"Bill D. Toronto" wrote:

I've got a matrix of locations. I want to count each time that the location
appears in the range.
E.g.
ETL London ETO Ottawa ETT Toronto
MTE Edmonton MTN Mountain Time North MTC Calgary
ETT Toronto ETL London CTW Winnipeg
ATF Fredericton ATC Charlottetown ATJ St John's
ATC Charlottetown ATF Fredericton ATH Halifax
ATC Charlottetown ATF Fredericton ATH Halifax

What is the best way to find out how many times that each city appears in
the list? Should I use pivot charts??? or is it an worksheet function that
will do the trick?
Many thanks,



All times are GMT +1. The time now is 06:09 AM.

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