Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing rows featuring certain words
Hello,
I am looking to remove all rows featuring a certain word in an activ sheet. the word is confined to a single colum. I would like to use macro to do this but if anyone can think of a way to do it short o deleting each cell individually my self that would help too thanks a million Chuc -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing rows featuring certain words
If the word is a constant value in the cell (not produced by a formula) and
stands alone. Word = "word to look for" With Columns(5) .Replace What:=Word, Replacement:="=NA()", _ LookAt:=xlWhole, _ SearchOrder:=xlByRows, _ MatchCase:=False .SpecialCells(xlCellTypeFormulas, xlErrors).EntireRow.Delete End With -- Regards, Tom Ogilvy "clane " wrote in message ... Hello, I am looking to remove all rows featuring a certain word in an active sheet. the word is confined to a single colum. I would like to use a macro to do this but if anyone can think of a way to do it short of deleting each cell individually my self that would help too thanks a million Chuck --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing rows featuring certain words
Hi
try the following macro: Sub delete_rows() Dim lastrow As Long Dim row_index As Long Application.ScreenUpdating = False lastrow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row For row_index = lastrow - 1 To 1 Step -1 If Cells(row_index, "A").Value= "your_value" then Rows(row_index).delete End If Next Application.ScreenUpdating = True End Sub -----Original Message----- Hello, I am looking to remove all rows featuring a certain word in an active sheet. the word is confined to a single colum. I would like to use a macro to do this but if anyone can think of a way to do it short of deleting each cell individually my self that would help too thanks a million Chuck --- Message posted from http://www.ExcelForum.com/ . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing rows featuring certain words
Thank you for your help,
i got them all removed :) :) :) :) thanks a lot Chuc -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Removing duplicate rows | New Users to Excel | |||
Removing Rows for Printing | Excel Worksheet Functions | |||
removing a space between words in a cell | Excel Worksheet Functions | |||
Removing Blank Rows? | Excel Programming | |||
trouble removing rows | Excel Programming |