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!!
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!!
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!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks