+ Reply to Thread
Results 1 to 4 of 4

delete entire rows based on cell value in multiple sheets

  1. #1
    Registered User
    Join Date
    11-12-2013
    Location
    lahore pakistan
    MS-Off Ver
    Excel 2007
    Posts
    44

    delete entire rows based on cell value in multiple sheets

    Hi,

    I want to run the below code for multiple sheets in a workbook but it is only working for first sheet.

    here is the code.

    Sub Find_ANN()
    Dim rng As Range
    Dim what As String

    what = "#DIV/0!"
    Do
    Set rng = ActiveSheet.UsedRange.Find(what)
    If rng Is Nothing Then
    Exit Do
    Else
    Rows(rng.Row).Delete
    End If
    Loop
    End Sub

    please modify it for me so that it can run for all worksheets in a workbook.

    Regards

  2. #2
    Registered User
    Join Date
    08-29-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: delete entire rows based on cell value in multiple sheets

    See if below code is working

    HTML Code: 

  3. #3
    Registered User
    Join Date
    11-12-2013
    Location
    lahore pakistan
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: delete entire rows based on cell value in multiple sheets

    Thank you very much Dinesh.

    It works.

    once again thankyou.

  4. #4
    Registered User
    Join Date
    08-29-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: delete entire rows based on cell value in multiple sheets

    Your Welcome...

    Please mark the thread as 'Solved' using Thread tools

+ 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. unable to delete entire row of empty cells in columns across multiple sheets.
    By CCLaMor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-09-2014, 02:03 PM
  2. Delete rows based on value in multiple sheets
    By JohnSmith33 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2014, 11:49 AM
  3. Delete Rows if value in cell does not equal desired value ACROSS multiple sheets
    By nature47 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2009, 02:00 AM
  4. delete entire rows based on a criteria
    By acekargo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2008, 11:15 PM
  5. Replies: 2
    Last Post: 10-03-2005, 10:05 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