Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The code below is supposed to select all the none duplicate records
from a given range, but for some strange reason I do get duplicates but only when the first cell in the range is identical to the second cell in the range, if the first and second cells within the range are not identical then I get all none duplicates in the output. How can I prevent the output from containing duplicate records? I did think of pre-sorting the range so that non-duplicate records were in the first and second cells, but I can never guarentee that non-duplicates would be in the range. Dim aRange As Object Set aRange = ActiveSheet.Range _ (Selection, Selection.End(xlDown)) aRange.AdvancedFilter Action:=xlFilterCopy, CopyToRange:= _ Range("G3"), Unique:=True burl |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Burl,
Try putting a header in the top cell. HTH Regards, Howard "burl_rfc" wrote in message oups.com... The code below is supposed to select all the none duplicate records from a given range, but for some strange reason I do get duplicates but only when the first cell in the range is identical to the second cell in the range, if the first and second cells within the range are not identical then I get all none duplicates in the output. How can I prevent the output from containing duplicate records? I did think of pre-sorting the range so that non-duplicate records were in the first and second cells, but I can never guarentee that non-duplicates would be in the range. Dim aRange As Object Set aRange = ActiveSheet.Range _ (Selection, Selection.End(xlDown)) aRange.AdvancedFilter Action:=xlFilterCopy, CopyToRange:= _ Range("G3"), Unique:=True burl |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
unique records by advanced filter | Excel Discussion (Misc queries) | |||
Advanced Filter - extracting unique records | Excel Worksheet Functions | |||
"Live" Advanced Filter (for unique records) | Excel Discussion (Misc queries) | |||
Error using Advanced Filter Unique Records | Excel Discussion (Misc queries) | |||
Inconsistent Results: Advanced Filter Unique Records Only | Excel Discussion (Misc queries) |