+ Reply to Thread
Results 1 to 5 of 5

delete rows of specific value or sign

  1. #1
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    delete rows of specific value or sign

    I am using excel2003

    I am try to delete all row in sheet1 that have the sign "..." in column b.

    I refer below thread which is similar
    http://www.excelforum.com/excel-prog...fic-value.html

    & I try it with necessary changes but those row not delete. I am attach sample file. In that file from row 186 to 214 in column B at the end of part number "..." (three dot) show. I want those row deleted.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: delete rows of specific value or sign

    Does this help ?

    I added a wildcard to the value to lookup and col changed to "b" in Roy's code

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-12-2010
    Location
    Miami
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: delete rows of specific value or sign

    Sub Find_and_Delete()
    Dim rngCell As Range
    Const strFind As String = "..."

    Application.ScreenUpdating = False
    With Sheet1
    Set rngCell = .Range("B:B").Find(what:=strFind)
    Do Until rngCell Is Nothing
    rngCell.EntireRow.Delete
    Set rngCell = .Range("B:B").FindNext
    Loop
    End With
    Application.ScreenUpdating = True

    End Sub




    The above code will search for "..." in All of Column B and delete all of the rows containing "..." in colum B. It doesn't search that it ends in "..." so if you have another cell with "..." say in the middle it will delete aswell.

  4. #4
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: delete rows of specific value or sign

    First time i have run & found row 186 to 214 deleted. But after that again second time i have given trial & changes in row 2 to 4 with same "..." sign after that i have run the prog. but found those row are not delete. Anything wrong with oprating prog.

    Attach file for your ready ref.
    Thanks for early reply.
    Attached Files Attached Files

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: delete rows of specific value or sign

    bandit, please take a few minutes to read the forum rules, and then edit your post to add CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

+ 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