View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
cmk18[_10_] cmk18[_10_] is offline
external usenet poster
 
Posts: 1
Default How do I FILTER this?


If you want to jst do this once, you can use the Advanced Filter utility
under Data/Filter. You would select the rows in which the data exist on
sheet2, select copy to location, and also unique records only. If you
need it to happen dynamically, you would put this code in vba.


Range("$A:$A").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Sheet1.Range("A1"), Unique:=True

You would probably want to put this in the Sheet2 Deactivate sub
function.

Tip: If you know how to do something with workbook functions or
utilities, but don't know how to do it in VBA using the macro recorder
can help you determine the syntax needed. Simply turn ont he macro
recorder and do what you want vba to do, and you'll have the code
(though not always as clean as you might like it to be)


--
cmk18
------------------------------------------------------------------------
cmk18's Profile: http://www.excelforum.com/member.php...fo&userid=6047
View this thread: http://www.excelforum.com/showthread...hreadid=386538