counting values in a column

J

Jerry

I have a spreadsheet that I need to count values in a column. For instance
Column A has the following values 1,15,3,45,1,1,15,20,3,10. I need to create
another worksheet containing the answer as follows:
Column A Column B
1 3
3 2
10 1
15 2
20 1
45 1
Your assistance is greatly appreciated
 
J

joel

I don't know if you want to do it manually or with a macro. I wil
explaing the manual method

1) You need to create a list of unique numbers. the advance metho
does this nicely but only on the same worksheet. So select the list o
original numbers then from menu Data - Advance Filter select the Uniqu
button and select copy to another location choose new location an
press OK. Now copy the unique list to the 2nd worksheet.


2) Now you can use the Countif formula to get the quantities.

=countif(Sheet1!A$1:A$1000, A1)

Place formula in column B along side the list of unique numbers. The
copy the formula down the column on sheet 2.


The formula will count all the values in sheet 1 that matches th
unique numbers in sheet 2
 
B

Beverly

Hi Jerry,

You can use the "countif" function for that. The formula for cell B2 would
be:

=countif($a:$a,a2)

When you copy the formula down, a2 will become a3, a4, etc. and the value
you're counting will change accordingly.

Beverly
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top