View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Stutter in AdvancedFilter Unique Results?

This is generally caused because you don't have a header row. the
Autofilter assumes your data range is like

Header1 Header2
Data Data
Data Date

If you have

Data Data
Data Data
Data Date

it treats the first row as a header and copies it - thus if that value is
found later in the table, you get a single duplicate entry.

May not be your problem, but it is the most likely that occurs to me.

--
Regards,
Tom Ogilvy


"Ed" wrote in message
...
After pasting a data range into my template workbook (Paste Special -

Values
Only), I filter two ranges for Unique Values using
' Filter unique values
' Subsystems
Range("SUBSYSTEM").AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range( _
"AA1"), Unique:=True
' Chargeability
Range("CHARGEABILITY").AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range( _
"AD1"), Unique:=True

It's not unusual to get a "stutter" - one value showing up twice. The

full
range has 862 values; the filter yields 12 Unique Values, which is the

same
as what AutoFilter shows. But one value is repeated. The AutoFilter
doesn't show it twice. Neither result from the filter shows an extra

space,
although I haven't checked the 239 out of the 862 that match the repeated
value.

Any suggestions?

Ed