ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   counting values in a column (https://www.excelbanter.com/excel-programming/439616-counting-values-column.html)

Jerry

counting values in a column
 
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

joel[_673_]

counting values in a column
 

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

1) You need to create a list of unique numbers. the advance method
does this nicely but only on the same worksheet. So select the list of
original numbers then from menu Data - Advance Filter select the Unique
button and select copy to another location choose new location and
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. Then
copy the formula down the column on sheet 2.


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


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=179841

Microsoft Office Help


Beverly

counting values in a column
 
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

"Jerry" wrote:

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


B Lynn B

counting values in a column
 
Pivot table!

"Jerry" wrote:

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



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

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