# Determining Number of Occurrences of Data in Large Spreadsheet

1. ## Determining Number of Occurrences of Data in Large Spreadsheet

Hi!

I have large spreadsheet of data (over 6000 lines) of electric charging stations in the US and corresponding data. One of the columns is City. I would like to learn the number of times each city appears as a means of discovering the cities with the most charging stations. Does anyone know the easiest way to do this? I tried "count if" but it is very tedious as I have to type the name of the city and there are hundreds of cities. Thank you so much!

2. ## Re: Determining Number of Occurrences of Data in Large Spreadsheet

Why not use a Pivot Table if your layout permits?

3. ## Re: Determining Number of Occurrences of Data in Large Spreadsheet

Easy (if you have two spare columns). Say the city names are in column D. Say the spare columns are columns Y and Z.

1. Copy column D to column Y
2. In the Data Tab, click on Remove Duplicates to remove duplicates from column Y
3. In Z1 enter =COUNTIF(D:D,Y1) and copy down

An alternative is to create a Pivot Table.

4. ## Re: Determining Number of Occurrences of Data in Large Spreadsheet

Thank you so much! I did the same thing using pivot tables this summer but for some reason I completely forgot!! Duh!! Thanks guys!

5. ## Re: Determining Number of Occurrences of Data in Large Spreadsheet

@ Stellabella

Welcome to the forum.

Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
Thanks.

Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

#### Thread Information

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1