+ Reply to Thread
Results 1 to 2 of 2

delete a cell if

  1. #1
    Tim
    Guest

    delete a cell if

    delete a cell if it contains a spefic word, and shift the row left? i need
    the programe to do this automatically? and not to have to do it manually, as
    there are 57,000 lines on the sheet, and about 5000 will need to be deleted.

    HELP!!

  2. #2
    Gary''s Student
    Guest

    RE: delete a cell if

    Enter and run this macro:

    Sub Macro1()
    Dim i, j As Long
    Dim s, ss As String
    ss = "your word"
    For i = 10 To 1 Step -1
    For j = 10 To 1 Step -1
    s = Cells(j, i).Value
    If Not (InStr(s, ss) = 0) Then
    Cells(j, i).Delete Shift:=xlToLeft
    End If
    Next
    Next
    End Sub


    As coded it covers 10 rows by 10 columns. Expand it to suit your needs.
    --
    Gary's Student


    "Tim" wrote:

    > delete a cell if it contains a spefic word, and shift the row left? i need
    > the programe to do this automatically? and not to have to do it manually, as
    > there are 57,000 lines on the sheet, and about 5000 will need to be deleted.
    >
    > HELP!!


+ 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