Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Counts of unique keys in a list

Hi,

I have a collection of of keys that I wish to summarise;

a
z
b
c
d
a
c
c
d


I would like to produce the following (preferably in alphabetical
order) summary AND graph the results (i think this means I cant use
subtotal)

a - 2
b - 1
c - 3
d - 2
z - 1

I would really appreciate any help on this as I really dont know much
about excel

Thanks,

Gary

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Counts of unique keys in a list

Assume your data is in the range A2:A10 and cell A1 is the header.

Select the range A1:A10
Goto the menu DataFilterAdvanced filter
Select: Copy to another location
Copy to: for demo purposes, we'll use cell D1 so, enter D1.
Select: Unique records only
OK

Now, (based on your sample) the uniques have been extracted and are in the
range D1 (header) :D6
Sort the range D2:D6 ascending
Enter this formula in E2:

=COUNTIF(A$2:A$10,D2)

Copy down to E6

Biff

"gazza67" wrote in message
ups.com...
Hi,

I have a collection of of keys that I wish to summarise;

a
z
b
c
d
a
c
c
d


I would like to produce the following (preferably in alphabetical
order) summary AND graph the results (i think this means I cant use
subtotal)

a - 2
b - 1
c - 3
d - 2
z - 1

I would really appreciate any help on this as I really dont know much
about excel

Thanks,

Gary



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default Counts of unique keys in a list

Hi Gray,
Please do the following:

Let's assume that your inputs starts from A1 to A15, then your results cells
starts from A20 in alphabitical order.

A20 = A
A21 = B
A22 = C
A23= D

then on B20 put this formula: COUNTIF(A1:A15,A20) Or: COUNTIF(A1:A15,"A")

and then drag down the formula for other letters.

Hope this help you.

Daoud Fakhry

"gazza67" wrote:

Hi,

I have a collection of of keys that I wish to summarise;

a
z
b
c
d
a
c
c
d


I would like to produce the following (preferably in alphabetical
order) summary AND graph the results (i think this means I cant use
subtotal)

a - 2
b - 1
c - 3
d - 2
z - 1

I would really appreciate any help on this as I really dont know much
about excel

Thanks,

Gary


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 340
Default Counts of unique keys in a list

Another method: Select a cell outside the table and choose
dataconsolidate on the range with 'labels in left column' and 'count'
selected. This method needs more than one column of data so add a copy
of data to the left if necessary.



On Jan 28, 6:24 am, "gazza67" wrote:
Hi,

I have a collection of of keys that I wish to summarise;

a
z
b
c
d
a
c
c
d

I would like to produce the following (preferably in alphabetical
order) summary AND graph the results (i think this means I cant use
subtotal)

a - 2
b - 1
c - 3
d - 2
z - 1

I would really appreciate any help on this as I really dont know much
about excel

Thanks,

Gary


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default Counts of unique keys in a list


Thanks for posting that.
I hadn't looked at the Consolidate method in years.
I have been using pivot table code to count instances.
Consolidate appears to be simpler, faster code then that required for a pivot table.
Must be a catch somewhere. <g
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Lori"
wrote in message
Another method: Select a cell outside the table and choose
dataconsolidate on the range with 'labels in left column' and 'count'
selected. This method needs more than one column of data so add a copy
of data to the left if necessary.




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default Counts of unique keys in a list


Wrong conclusion, did some comparisons.
Using a pivot table is much, much faster than using Consolidate.
Jim Cone


"Jim Cone"
wrote in message Thanks for posting that.
I hadn't looked at the Consolidate method in years.
I have been using pivot table code to count instances.
Consolidate appears to be simpler, faster code then that required for a pivot table.
Must be a catch somewhere. <g
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Lori"
wrote in message
Another method: Select a cell outside the table and choose
dataconsolidate on the range with 'labels in left column' and 'count'
selected. This method needs more than one column of data so add a copy
of data to the left if necessary.


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 340
Default Counts of unique keys in a list

Agreed, pivot tables are significantly faster but it's worth taking
another look at the consolidate method as it has some little known
features which can be very useful and reduce the need for coding. For
example you can:

- apply to a range with with existing row and column headings e.g. to
match two lists.
- use wildcards for filenames such as: *!data to reference all files
in a directory
- check the create links option with count and labels in top row and
then remove subtotals to combine data from similar workbooks.



On Jan 28, 10:19 pm, "Jim Cone" wrote:
Wrong conclusion, did some comparisons.
Using a pivot table is much, much faster than using Consolidate.
Jim Cone

"Jim Cone"
wrote in message Thanks for posting that.
I hadn't looked at the Consolidate method in years.
I have been using pivot table code to count instances.
Consolidate appears to be simpler, faster code then that required for a pivot table.
Must be a catch somewhere. <g
--
Jim Cone
San Francisco, USAhttp://www.realezsites.com/bus/primitivesoftware

"Lori"
wrote in message
Another method: Select a cell outside the table and choose
dataconsolidate on the range with 'labels in left column' and 'count'
selected. This method needs more than one column of data so add a copy
of data to the left if necessary.


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
Advanced filter and a list Epinn New Users to Excel 14 September 20th 06 02:11 AM
counting unique entries in a list Michael Excel Discussion (Misc queries) 1 November 10th 05 03:00 PM
unique occurences in list Chandler Excel Worksheet Functions 2 May 2nd 05 02:06 PM
Pull unique names for drop down list [email protected] Excel Discussion (Misc queries) 3 February 1st 05 10:23 PM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM


All times are GMT +1. The time now is 12:12 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"