list and count cities names in a column.

Manolocs

Active Member
Joined
Mar 28, 2008
Messages
340
Hello, Column A is a large list of cities more than 10k duplicated city names, I need to list the names without duplicate. Preferable with formula only.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
How about


Excel 2013/2016
AB
1County
2HertfordshireHertfordshire
3HertfordshireWest Midlands
4HertfordshireWorcestershire
5HertfordshireWarwickshire
6West MidlandsStaffordshire
7West Midlands
8West Midlands
9Worcestershire
10Warwickshire
11West Midlands
12Warwickshire
13Worcestershire
14Staffordshire
Jan2
Cell Formulas
RangeFormula
B2{=INDEX(A$2:A$32,MATCH(0,COUNTIF(B$1:B1,A$2:A$32),0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hi Fluff, sorry I can not figure out how to make the formula you gave me in the top to show more than one city. I tried to copy down but shows the first city again.
:rolleyes:
 
Upvote 0
Are you sure that the names are the same?
Check for any leading/trailing spaces.
 
Upvote 0
I mean the array only gives me the first city name, does not give me the list of all of them. :(
is there any limitation for the array? I set the range to 17000 so:
[FONT=&quot]{=INDEX(A$2:A$17886,MATCH(0,COUNTIF(B$1:B1,A$2:A$17886),0))}
is that correct?

[/FONT]
 
Last edited:
Upvote 0
That should work.
Have you copied the formula down?
 
Upvote 0
I mean the array only gives me the first city name, does not give me the list of all of them. :(
is there any limitation for the array? I set the range to 17000 so:
{=INDEX(A$2:A$17886,MATCH(0,COUNTIF(B$1:B1,A$2:A$17886),0))}
is that correct?


Try these steps
1. insert the formula in B2 (must be in this cell);
2. confirm with Ctrl+Shift+Enter simultaneously;
3. and copy down.

M.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top