PDA

View Full Version : Excel Question


Ben E Lou
09-13-2012, 02:37 PM
If a value is eliminated in a particular column, I want to eliminate all rows containing that row. It's not the "Remove Duplicates" feature, because that one, as far as I can tell, leaves one row there. In other words, I want to eliminate any AddressIds that exist more than once. I would want this:

<table border="0" cellpadding="0" cellspacing="0" width="128"><colgroup><col style="width:48pt" span="2" width="64"> </colgroup><tbody><tr style="height:12.75pt" height="17"> <td style="height:12.75pt;width:48pt" height="17" width="64">AddressID</td> <td style="width:48pt" width="64">Lastname</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">1</td> <td>Jones</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">2</td> <td>Smith</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">3</td> <td>Johnson</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">4</td> <td>Johnson-Smith</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">4</td> <td>Johnson</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">5</td> <td>Williams</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">6</td> <td>Lewis</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">7</td> <td>Jackson</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">7</td> <td>Jackson</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">7</td> <td>Jackson</td> </tr> </tbody></table>

to come out as this:

<table border="0" cellpadding="0" cellspacing="0" width="128"><colgroup><col style="width:48pt" span="2" width="64"> </colgroup><tbody><tr style="height:12.75pt" height="17"> <td style="height:12.75pt;width:48pt" height="17" width="64">AddressID</td> <td style="width:48pt" width="64">Lastname</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">1</td> <td>Jones</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">2</td> <td>Smith</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">3</td> <td>Johnson</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">5</td> <td>Williams</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" align="right" height="17">6</td> <td>Lewis</td> </tr> </tbody></table>

Passacaglia
09-13-2012, 02:51 PM
Not sure if this is the most efficient way, but:

in Column C, put

=countif($a$2:$a$11,a2)

And paste that down. Sort Column C, and remove everything greater than 1.

Suburban Rhythm
09-13-2012, 02:55 PM
Not sure if this is the most efficient way, but:

in Column C, put

=countif($a$2:$a$11,a2)

And paste that down. Sort Column C, and remove everything greater than 1.

This was going to be my answer...pretty sure we had a similar Excel question in the past that was solved this method.

Suburban Rhythm
09-13-2012, 02:56 PM
Dola

PING Excel gurus - Front Office Football Central (http://www.osatwork.com/fofc/showthread.php?t=82601)

Ben E Lou
09-13-2012, 02:58 PM
Yup. That did it. Thanks!