Results 1 to 2 of 2

Advanced filter code

Threaded View

jomili Advanced filter code 09-29-2011, 09:07 AM
jomili Re: Advanced filter code 09-29-2011, 09:14 AM
  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,056

    Advanced filter code

    I've got a line of code that's not working the way I want it to, though it has for months. I've cleaned my project with Code Cleaner and still can't get it to work right. Here's the errant code:
     ws.AutoFilter.Range.Columns(2).SpecialCells(xlCellTypeVisible).Copy
        Sheets("Temp").Range("A1").End(xlUp).Offset(0, 0).PasteSpecial Paste:=xlPasteValues
    
        Sheets("Temp").Columns(1).SpecialCells(xlCellTypeVisible).AdvancedFilter Action:=xlFilterCopy, copytorange:=Sheets("Temp").Range("B1"), Unique:=True
    it's doing the first part just right, copying the range from WS to Temp. In the next line I want to copy what's now in Temp column 1 and paste just the unique values to column 2, but my code is just skipping right over that line. Any help would be greatly appreciated.
    Last edited by jomili; 10-11-2011 at 12:53 PM.

Thread Information

Users Browsing this Thread

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

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