+ Reply to Thread
Results 1 to 6 of 6

Delete entire row depending on the contents of a cell

  1. #1
    Registered User
    Join Date
    07-10-2008
    Location
    Norwich, England
    MS-Off Ver
    Office XP
    Posts
    15

    Question Delete entire row depending on the contents of a cell

    I'm trying to write a procedure which will search the contents of Column B of my worksheet for the word "Total". Whenever the word "Total" is found in a cell within Column B, the entire row should be deleted.
    How would I do this? Thank you in advance for any help.
    Last edited by LemonTwist; 01-21-2009 at 07:22 AM.

  2. #2
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Try this


    Please Login or Register  to view this content.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    Shijesh Kumar, perhaps you should add a loop to your code to handle multiple instances ?

  4. #4
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717

    Thumbs down

    Hi DonkeyOte,

    Its just a sample code...explaining how u can achive the result...
    However below is with loop

    Please Login or Register  to view this content.
    Last edited by Shijesh Kumar; 01-20-2009 at 12:59 PM.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    LemonTwist, please see below:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-10-2008
    Location
    Norwich, England
    MS-Off Ver
    Office XP
    Posts
    15
    Quote Originally Posted by DonkeyOte View Post
    LemonTwist, please see below:

    Please Login or Register  to view this content.
    Thank you for this, it works fine and it has solved my problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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