+ Reply to Thread
Results 1 to 3 of 3

Advanced Filtering for Unique Records Issue

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    38

    Advanced Filtering for Unique Records Issue

    HI,

    I am using an advanced filter to extract unique records from various columns of data. The filter is below:

    'Extract list of unique entries
    shSource.Range(sourceColumn & "11:" & sourceColumn & LR).AdvancedFilter Action:=xlFilterCopy, _
    CopyToRange:=shSetup.Range(destinationColumn & "1"), Unique:=True

    The filter works fine but there is one issue. The filter starts filtering in row 11 which is the header row. Still OK but when the filter copies the unique records the header copied over is NOT the header of the column being filtered, sourceColumn, but rather the first non-empty header in row 11 which happens to be header for column B. I really need the header corresponding to the column being filtered copied over. Can anyone suggest how I can fix my code? Thank you.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Advanced Filtering for Unique Records Issue

    the code appears fine-is the destination cell blank initially? can you post a workbook?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    04-30-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Advanced Filtering for Unique Records Issue

    The destination cell is blank initially.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1