Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
delete a cell if it contains specific word | Excel Discussion (Misc queries) | |||
VBA Excel Macro to delete contents in named cell | Excel Discussion (Misc queries) | |||
Delete row based on contents of cell | Excel Discussion (Misc queries) | |||
How do I delete the automatically inserted ' in every Excel cell? | Excel Discussion (Misc queries) | |||
cell color index comparison | New Users to Excel |