Hi,
Right click your sheet tab, view code and paste this in. Change the text
(Cirrectly TEST) to the text you want but it must be in uppercase.
Sub marine()
Dim myrange As Range, MyRange1 As Range
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
Set myrange = Range("A1:A" & lastrow)
For Each c In myrange
If UCase(Trim(c.Value)) = "TEST" Then 'Change to suit must be upercase
If MyRange1 Is Nothing Then
Set MyRange1 = c.EntireRow
Else
Set MyRange1 = Union(MyRange1, c.EntireRow)
End If
End If
Next
If Not MyRange1 Is Nothing Then MyRange1.Delete
End Sub
"Opal" wrote:
I have a file that I update weekly and the data source has been
changed to include more data than what I need. I cannot sort
the data from the source so I am trying to create a macro in
excel to remove the extra data I do not need. I only need 14
rows of data, but my source now gives me 55.
I have looked at Ron DeBruin's site for assistance:
http://www.rondebruin.nl/delete.htm#Find
But since I need to remove 41 rows of unneeded data, I was
unsure how to adapt it to my needs. I want to be able to
remove rows based on the text value in column A.
Does anyone have any advice?