ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Duplicate cells (https://www.excelbanter.com/excel-discussion-misc-queries/114351-duplicate-cells.html)

cdavis82

Duplicate cells
 
nLooking for a way to delete all but one row that contains one duplicate
cell. In other words I have a list of names and addresses. Several of the
people are at the same address. I only want one name for each address and it
doesn't matter which name is used for that address. Any ideas?

Casey

Dave Peterson

Duplicate cells
 
Say your addresses are in column B.

Then insert a new column C and put this in C1:
=countif($b$1:b1,b1)
and drag down that column

You'll see a 1 for the first address in the list. And each additional address
will be incremented by 1 (1, 2, 3, ...)

Then select column C and apply data|filter|autofilter

Filter to show the cells that are greater than 1.

Delete those visible rows.

Be careful.

If you have an address:
123 Main Street
In Chicago, you don't want to delete the records with
123 Main Street
in New York.



cdavis82 wrote:

nLooking for a way to delete all but one row that contains one duplicate
cell. In other words I have a list of names and addresses. Several of the
people are at the same address. I only want one name for each address and it
doesn't matter which name is used for that address. Any ideas?

Casey


--

Dave Peterson


All times are GMT +1. The time now is 10:43 AM.

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