+ Reply to Thread
Results 1 to 11 of 11

Advanced Filter with slicer return error

  1. #1
    Registered User
    Join Date
    05-04-2020
    Location
    Egypt
    MS-Off Ver
    Office 2016/2019
    Posts
    20

    Advanced Filter with slicer return error

    I have an issue in the attached file when trying to export filtered data to another sheet with advanced filter recorded with vba, when table's slicers are in another sheet "Slicers Sheet", the macro return an error "Run-time error '1004': AdvancedFilter method of Range class failed".

    your support will be highly appreciated, noting that my original file include more than 2 slicers if this info matters.
    Attached Files Attached Files

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Advanced Filter with slicer return error

    Try...
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-04-2020
    Location
    Egypt
    MS-Off Ver
    Office 2016/2019
    Posts
    20

    Re: Advanced Filter with slicer return error

    Thanks for your reply, but still the same error shows after applying the code (sample attached with the new code)
    Attached Files Attached Files

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Advanced Filter with slicer return error

    Kinda weird, I dl'd it and it works for me. Try it this way...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-04-2020
    Location
    Egypt
    MS-Off Ver
    Office 2016/2019
    Posts
    20

    Re: Advanced Filter with slicer return error

    Really weird if it works for you with my attached sample file and not for me!!!
    the new code also show the same error for me.
    I attached a screenshot for the error message when running the macro, and another screenshot after selecting Debug.
    Thank you for your effort with the issue.
    Attached Images Attached Images

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,071

    Re: Advanced Filter with slicer return error

    Can you use advanced filter on a table if it has slicers?
    As soon as I put slicers on a table, the Filter & advanced filter options are greyed out.
    If you delete the slicers the code works.

  7. #7
    Registered User
    Join Date
    05-04-2020
    Location
    Egypt
    MS-Off Ver
    Office 2016/2019
    Posts
    20

    Re: Advanced Filter with slicer return error

    I run advanced filter option outside the table, by selecting any blank cell, but I have the below 2 scenarios:

    1- If I run advanced filter in the same sheet where the table exists, it accept the query and run but slicers shows Out-of-date and must be updated manually to be reactivated, or to be totally deactivated if slicers are in another sheet away from table's sheet.
    2- If I run advanced filter outside the sheet where the table exists, it shows the error message mentioned previously.

    It's a very weird behavior from excel vba.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,071

    Re: Advanced Filter with slicer return error

    If you delete the slicers & then use advanced filter, you can then add the slicers again & it seems to work.

  9. #9
    Registered User
    Join Date
    05-04-2020
    Location
    Egypt
    MS-Off Ver
    Office 2016/2019
    Posts
    20

    Re: Advanced Filter with slicer return error

    Thanks for your reply,
    sure it will work but will require a lot of vba code to add and customize the slicer again.

  10. #10
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Advanced Filter with slicer return error

    Not too difficult...
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    05-04-2020
    Location
    Egypt
    MS-Off Ver
    Office 2016/2019
    Posts
    20

    Re: Advanced Filter with slicer return error

    Thank you for your concern & reply, I'll apply your code on my main sheet based on my actual slicers No., format, location and size.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Advanced filter - return last business day of each week - holidays accounted
    By ScorpionHaven in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-01-2020, 08:33 AM
  2. [SOLVED] Advanced Filter Criteria to Return Cell Below...
    By Ourkid123uk in forum Excel General
    Replies: 4
    Last Post: 05-16-2017, 01:44 PM
  3. Advanced Filter Error
    By csh8428 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2012, 05:56 PM
  4. Return Unique Text Values without Advanced Filter
    By nicknick5219 in forum Excel General
    Replies: 11
    Last Post: 05-21-2009, 10:15 AM
  5. Advanced Filter to return Rows w/blank column
    By ChemistB in forum Excel General
    Replies: 3
    Last Post: 04-01-2009, 01:14 PM
  6. [SOLVED] Advanced Filter Error
    By Floyd Bates in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-06-2006, 02:20 PM
  7. Advanced Filter Error
    By Claret in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2006, 11:55 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