View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Filtering in VBA

Alan,

Very simple using built-in functionality

Columns("A:A").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("B1"), _
Unique:=True

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Alan L. Wagoner" wrote in message
...
I have a column of values starting in A2, Sheet 1. These values repeat

and
are not unique. I want column B2 to have a single occurrence of each cell
in column A.

As an example, here's what I'm looking for:

Sheet1:
Col A Col B
============
brown brown
blue blue
black black
orange orange
black red
black
brown
blue
blue
red
blue

Thanks in advance,

Alan L. Wagoner