ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Getting count of entries in a column (https://www.excelbanter.com/excel-programming/430836-re-getting-count-entries-column.html)

Jacob Skaria

Getting count of entries in a column
 

Hi Pawan

The below formula will give you the count of CA entries

'should return 2 with your example
=COUNTIF(A:A,"CA.*")

'should return 1 with your example
=COUNTIF(A:A,"WV.*")

If this post helps click Yes
---------------
Jacob Skaria


"Pawan" wrote:

Hello

I have an excel sheet with following data in column A:

CA
CA.SanFransisco
CA.PLeasanton
WV
WV.Matinsburg

There are hundreds of such entries in column A. I want to write a code which
will tell me how many entries are there for each state. e.g. In the above
case, I should get the result showing that CA has 2 entries and WV has 1
entry.

Is this possible and how?

Thanks in advance
Regards,
prm



All times are GMT +1. The time now is 12:05 PM.

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