try this url in vbeditor and run
Public Sub test()
line2:
Range("a1").Activate
On Error GoTo line1
Cells.Find(what:="blue").Activate
ActiveCell.EntireRow.Delete
GoTo line2
line1:
End Sub
it will remove all rows containing blue as string or sustring
==================================
Gary Rowe <GaryRowe@discussions.microsoft.com> wrote in message
news:0D1D8DA9-9C86-4B7F-8093-5D9C69DDF858@microsoft.com...
> perhaps autofilter might do this for you. You can select a custom filter
> selection using a starts with or contains "blue" and delete the rows that
> meet the criteria.
>
> "Pablo" wrote:
>
> > Hello:
> >
> > I need to be able to delete multiple rows out of a worksheet. What I
need to
> > be able to do is have a function/macro that can identify a string of
> > characters and then delete all the rows that have those characters.
> >
> > For example, if row 4, 18, and 45 all had "blue" in them (assume column
is
> > A), then I need something to go delete row, 4, 18, and 45.
> >
> > At the top of my worksheet I will have several, probably about 3,
criteria,
> > such as, "blue", "red", and "green" that will all need to be deleted.
> >
> > Now here's where I really need help. A row may have "blue-orange" and if
> > "blue" is the key identifier, the row with "blue-orange" will need to be
> > deleted also.
> >
> > Thanks!
> >
> >
> >
Bookmarks