+ Reply to Thread
Results 1 to 2 of 2

VBA Delete Results From Advanced Filter

  1. #1
    Registered User
    Join Date
    10-11-2018
    Location
    Minnesota
    MS-Off Ver
    Excel 2018
    Posts
    15

    VBA Delete Results From Advanced Filter

    Hello! I am looking for help on the following-
    I have uploaded a sample sheet:
    1. I have Worksheet "Data 1" with a Table. There is a VBA button to run an advanced filter and search criteria. There is also a VBA button to clear the filter. These work great!
    2. I also have a button to Delete the filtered result. I am uncertain how to program VBA to do this.
    - I need the VBA to ONLY delete the filtered result for a specific range, not the entire row. In the example sheet provided, the range would be C-G.

    3. I also need the same Delete button to also search for the first criteria on a second sheet (Worksheet "Data 2" in example uploaded) and delete the filtered result for columns B-D. I'm sure this is the same process as above, just on another sheet.

    4. If possible, I also need a way to "double check" that the user is certain they want to delete the data. I'm thinking if the Delete button is hit, a window pops up and says "are you sure you want to Delete this?" Yes No"


    Maybe this is too convoluted? Regardless I appreciate any insights.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: VBA Delete Results From Advanced Filter

    Maybe something like this ? (code assign to the "Delete" button)
    Please Login or Register  to view this content.
    The do-loop is to have the ActiveCell stop at the next visible row in case the filtered data doesn't fall on row 11.
    Once it gets the "first" row right under C10, then it define the visible range where the contents are to be cleared.

+ 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] How to use advanced text filter and get the value of cell that are not in the results?
    By ankitkraken in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-25-2019, 03:56 PM
  2. [SOLVED] Limit Advanced Filter results
    By no_Fate in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-06-2016, 03:57 AM
  3. Different results for Auto Filter and Advanced Filter
    By me20161130 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-01-2016, 09:02 AM
  4. [SOLVED] Advanced filter not equal (<>) results
    By whocares4 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-27-2015, 01:15 PM
  5. Delete Rows hidden by either Auto Filter and Advanced Filter
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2013, 10:29 AM
  6. [SOLVED] Advanced Filter results don't match auto filter
    By WaterWings in forum Excel General
    Replies: 1
    Last Post: 09-13-2012, 05:37 PM
  7. refresh advanced filter results
    By eagle in forum Excel General
    Replies: 2
    Last Post: 11-18-2005, 05:20 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