Results 1 to 10 of 12

Thread: Apply filter and delete rows thru Messege Box

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    15
    Hi,

    I tried, but it is not deleting the record after the given date. i.e it is struck on the filter.

    Code:
    Sub MYFILTER()
    Dim W1Startdate As Date
    W1Startdate = InputBox("Please Enter the Start Data in DD/MM/YYYY format")
    range("A2:T" & range("A1").End(xlDown).Row).AutoFilter Field:=7, Criteria1:=">" & W1Startdate
    range("A3:T" & range("A2").End(xlDown).Row).SpecialCells(12).EntireRow.Delete
    End Sub
    Kindly help
    Last edited by Excel Fox; 11-01-2014 at 09:16 PM. Reason: Code Tag added

Similar Threads

  1. Delete Rows Based on Conditions
    By AbiG2009 in forum Excel Help
    Replies: 6
    Last Post: 12-26-2018, 01:24 PM
  2. search for data and delete rows containing it
    By RickStewart in forum Excel Help
    Replies: 2
    Last Post: 02-24-2014, 09:12 PM
  3. Delete blank rows
    By dhivya.enjoy in forum Excel Help
    Replies: 5
    Last Post: 10-23-2013, 10:04 PM
  4. Delete Rows
    By ayazgreat in forum Excel Help
    Replies: 2
    Last Post: 12-13-2012, 11:48 AM
  5. Delete Empty Rows
    By Rasm in forum Excel Help
    Replies: 4
    Last Post: 04-28-2011, 02:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •