+ Reply to Thread
Results 1 to 7 of 7

Delete Rows where cell = "Settled"

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Delete Rows where cell = "Settled"

    I want to add some code to an ActiveX Control button that deletes any rows in the active sheet where column BA of that row has the word "Settled" in there.

    For example cells BA4 and BA6 has the word "Settled" in there all the other rows don't. So, when I press this button I want it to delete only rows 4 and 6.

    Could anyone please help?

    Thanks.
    Last edited by adam2308; 08-22-2012 at 01:28 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Delete Rows where cell = "Settled"

    Hi,

    Get the macro to autofilter the rows for the word 'settled' and then once filtered have the macro delete all the visible rows with a:

    [your filtered range].SpecialCells(xlCellTypeVisible).EntireRow.Delete

    instruction.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Delete Rows where cell = "Settled"

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  4. #4
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Delete Rows where cell = "Settled"

    Thanks for your replies.

    Richard - I don't quite follow what I need to do with your method.

    Patel45 - When I first looked at your code I thought it was exactly what I was looking for but when I applied it to my command button it doesn't seem to do anything.

    I've attached a workbook as an example to hopefully make it more explanatory.
    Attached Files Attached Files

  5. #5
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Delete Rows where cell = "Settled"

    Give this a try

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  6. #6
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Delete Rows where cell = "Settled"

    Mike - That works perfectly!

    Cheers guys!

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Delete Rows where cell = "Settled"

    Hi, adam2308,

    as BA is only a formula and the values houses in AY why not try this one:

    Please Login or Register  to view this content.
    Ciao,
    Holger

+ 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