Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 857
Default 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,

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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,

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 857
Default 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,

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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,



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing text in a repeated cell/row that is longer than repeated Valerie Dyet Excel Discussion (Misc queries) 1 February 13th 06 03:27 AM
Most repeated number nuno Excel Worksheet Functions 4 March 23rd 05 10:47 PM
repeated text maria Excel Discussion (Misc queries) 2 February 10th 05 10:57 PM
Repeated row carlo Excel Discussion (Misc queries) 2 December 3rd 04 10:47 AM
repeated numbers Iboa Excel Worksheet Functions 1 November 2nd 04 05:40 PM


All times are GMT +1. The time now is 08:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"