Keep unique values

G

gary

How can I keep cells that contain unique values plus their font color and fill color?

Here's a sample of my data. (In my spreadsheet, column A contains 331,000 cells).

A
008100985-5 2012
008100985-5 2012
008101043-7 2011
008101043-7 2012
008101759-1 2010
008101759-1 2010
008101759-1 2011
008101759-1 2011
008101759-1 2012
008101759-1 2012
008101837-8 2011
008101837-8 2011
008101837-8 2012
008101837-8 2012
008101838-9 2012
008101840-0 2008
008101840-0 2008
008101840-0 2009
008101840-0 2009
008101894-9 2011
008101894-9 2011
008101894-9 2012
008101894-9 2012
008101969-4 2012
008102038-6 2011
008102038-6 2011
008102041-8 2009
008102041-8 2009
008102296-2 2012
008102296-2 2012
008102313-4 2012
008102314-5 2012
008102317-8 2004
008102317-8 2004
008102317-8 2005
008102317-8 2005
008102317-8 2006
008102317-8 2006
008102317-8 2007
008102317-8 2007
008102580-8 2011
008102580-8 2011
008102580-8 2012
008102580-8 2012
008102593-0 2012
008102593-0 2012
008102612-4 2012
008102613-5 2012
008102614-6 2012
008102615-7 2012
008102616-8 2012
008102617-9 2012
008102620-1 2010
008102620-1 2012
008102621-2 1999
008102621-2 1999
008102621-2 2000
008102621-2 2000
008102621-2 2001
008102621-2 2001
008102621-2 2002
008102621-2 2002
008102621-2 2003
008102621-2 2003
008102621-2 2004
008102621-2 2004
008102621-2 2005
008102621-2 2005
008102621-2 2006
008102621-2 2006
008102621-2 2007
008102621-2 2007
008102621-2 2008
008102621-2 2008
008102621-2 2010
008102621-2 2010
008102621-2 2012
008102621-2 2012
008102628-9 2012
008102628-9 2012
008102631-1 2012
008102631-1 2012
008102632-2 2012
008102632-2 2012
008102633-3 2012
008102633-3 2012
008102668-5 2011
008102668-5 2011
008102675-1 2006
008102675-1 2006
008102675-1 2007
008102675-1 2007
008102675-1 2008
008102675-1 2008
008102675-1 2009
008102675-1 2009
008102675-1 2010
008102675-1 2010
008102675-1 2011
008102675-1 2011
008102675-1 2012
008102675-1 2012
008102678-4 2012
008102678-4 2012
008102811-7 2007
008102811-7 2007
008102811-7 2008
008102811-7 2008
008102811-7 2009
008102811-7 2009
008102811-7 2010
008102811-7 2010
008102811-7 2011
008102811-7 2011
008102811-7 2012
008102811-7 2012
008102820-5 2012
008102823-8 2008
008102823-8 2008
008102823-8 2009
008102823-8 2009
008102823-8 2010
008102823-8 2010
008102823-8 2011
008102823-8 2011
008102823-8 2012
008102823-8 2012
008102824-9 2010
008102825-0 2007
008102825-0 2007
008102825-0 2008
008102825-0 2008
008102825-0 2009
008102825-0 2009
008102825-0 2010
008102825-0 2010
008102825-0 2011
008102825-0 2011
008102825-0 2012
008102825-0 2012
008102826-1 2008
008102826-1 2008
008102826-1 2009
008102826-1 2009
008102826-1 2010
008102826-1 2010
008102826-1 2011
008102826-1 2011
008102826-1 2012
008102826-1 2012
008102827-2 2010
008102828-3 2007
008102828-3 2007
008102828-3 2008
008102828-3 2008
008102828-3 2009
008102828-3 2009
008102828-3 2010
008102828-3 2010
008102828-3 2011
008102828-3 2011
008102828-3 2012
008102828-3 2012
008102829-4 2007
008102829-4 2007
008102829-4 2012
008102829-4 2012
008102830-4 2007
008102830-4 2007
008102830-4 2012
008102830-4 2012
008102831-5 2012
008102831-5 2012
008102832-6 2010
008102832-6 2010
008102832-6 2011
008102832-6 2011
008102832-6 2012
008102832-6 2012
008102855-7 2012
008102861-2 2008
008102861-2 2008
008102861-2 2009
008102861-2 2009
008102861-2 2010
008102861-2 2010
008102861-2 2011
008102861-2 2011
008102861-2 2012
008102861-2 2012
008102869-0 2012
008102869-0 2012
008102871-1 2010
008102871-1 2010
008102871-1 2011
008102871-1 2011
008102871-1 2012
008102871-1 2012
008102872-2 2007
008102872-2 2007
008102872-2 2008
008102872-2 2008
008102872-2 2009
008102872-2 2009
008102872-2 2010
008102872-2 2010
008102872-2 2011
008102872-2 2011
008102872-2 2012
008102872-2 2012
008102889-8 2006
008102889-8 2006
008102890-8 2009
008102890-8 2009
008102890-8 2010
008102890-8 2010
008102890-8 2011
008102890-8 2011
008102890-8 2012
008102890-8 2012
008102907-1 2007
008102915-8 2012
008102918-1 2012
008102921-3 2012
008102924-6 2012
008102927-9 2012
008102930-1 2012
008102933-4 2012
008102936-7 2012
008102939-0 2012
008102947-7 2012
008102949-9 2012
008102951-0 2012
008102956-5 2012
008102956-5 2012
008102960-8 2012
008102960-8 2012
008102964-2 2012
008102964-2 2012
008102966-4 2010
008102966-4 2010
 
L

lhkittle

How can I keep cells that contain unique values plus their font color and fill color?



Here's a sample of my data. (In my spreadsheet, column A contains 331,000 cells).



A

008100985-5 2012

008100985-5 2012

008101043-7 2011

008101043-7 2012

008101759-1 2010

008101759-1 2010


Hi Gary,

Using the macro recorder, this seems to work on the sample given.
Where I colored several row's font, and fill colors.
They remained intact on the values that were not deleted.

Option Explicit

Sub Macro2()
ActiveSheet.Range("$D$1:$D$241").RemoveDuplicates Columns:=1, Header:=xlNo
End Sub

Regards,
Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top