ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sorting or adding numbers of the same value (https://www.excelbanter.com/excel-discussion-misc-queries/178829-sorting-adding-numbers-same-value.html)

luckysg

sorting or adding numbers of the same value
 
I want to count the number of 1's, 2, in a column. For example i use the
number 1 to represent a smith city resedient, and number 2 to represent
jackons city residents, i want to total the amount of each group?

FSt1

sorting or adding numbers of the same value
 
hi
=countif(A1:A500,1)
and
=countif(A1:A500,2)
Trick...if your two formula were in say B1 and B2, in C1, you could put the
number 1 or 2 then have only 1 formula like this....
= countif(A1:A500, C1)
the formula would count whatever is in C1.

Regards
FSt1

"luckysg" wrote:

I want to count the number of 1's, 2, in a column. For example i use the
number 1 to represent a smith city resedient, and number 2 to represent
jackons city residents, i want to total the amount of each group?



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

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