Results 1 to 9 of 9

Column disappear when using advanced Filtering through VBA

Threaded View

  1. #1
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Column disappear when using advanced Filtering through VBA

    Hi, I'm struggling to understand why after the first loop (Z=2) all of a sudden column A in WS ATT disappears. Worth adding that column M in WS L is a "dynamic" range (at first it contains 7 cells) in the sense that it shrinks with each loop (M2:M8, second loop: M2:M7 etc.). I can produce a sample, but maybe somebody see why my prob. is happening through this code?

    For Z = 2 To 5
    ThisWorkbook.Sheets.Add.Name = L.Range("M2").Value
            ATT.Range("A1:N100").AdvancedFilter Action:=xlFilterCopy, _
            CriteriaRange:=L.Range("A1:N2"), CopyToRange:=Sheets(Z).Range("A1"), Unique:=False
            L.Activate
            L.Range("M2").Select
            Selection.Delete Shift:=xlUp
    Next Z
    Last edited by GIS2013; 07-09-2014 at 05:22 PM.
    Please * if you like the answer

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Easy filtering method via vba/formula/advanced filtering?
    By jedemeyer1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-10-2014, 12:35 AM
  2. More advanced advanced filtering
    By Acceleracer in forum Excel General
    Replies: 2
    Last Post: 02-06-2014, 09:02 PM
  3. Advanced Filtering
    By jn_mohit in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-14-2008, 02:06 AM
  4. [SOLVED] advanced filtering in XLS
    By Debra Dalgleish in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 05:05 PM
  5. Advanced Filtering
    By CFL in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM

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