+ Reply to Thread
Results 1 to 3 of 3

Code that works in one location but not another location. (AdvancedFilter excel function)

  1. #1
    Forum Contributor
    Join Date
    04-11-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    325

    Code that works in one location but not another location. (AdvancedFilter excel function)

    I can't post the full code but can explain what I am doing. I'm wondering if anyone else has had this issue before.

    In one section of my macro I want to run the following line of code.

    Please Login or Register  to view this content.
    The code only works for a certain number of items on the second sheet of the workbook. If I run the same code on the same items in the same spot, but on the first worksheet, everything works correctly.

    To re-clarify everything...

    I have Worksheet 1, Worksheet 2, and Worksheet 3. The advanced filter only works for about 500 items on the second worksheet but for any number of items on worksheet 1. IS there some setting I am missing that is causing me these problems? This issue is actually pretty serious for me and I can't figure out why it's happening.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code that works in one location but not another location. (AdvancedFilter excel functi

    You don't have any worksheet references in that code.

    Also, why not change the range to filter to the range with data instead of the entire column?
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Code that works in one location but not another location. (AdvancedFilter excel functi

    Please Login or Register  to view this content.
    I do not see any error with the syntax, but since you have not qualified the worksheet you want to work, the code may confuse if you jump from one sheet to another while you are working on the workbook. You have to be on the active sheet when you run the code and should stay on it until the code ends.

+ Reply to Thread

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