Find text and remove row

  • Thread starter Thread starter Stephen
  • Start date Start date
S

Stephen

I have a 10 column list. that list can have anwhere from
40-60 rows depending on the days information.

I want to search column c for any cell containing the
text "money market". once it finds a case where the cell
contains the words "money market", then it highlights
that entire row and delets it. then goes on to the next
case and does the same.

example cells:

NEW YORK MONEY MARKET
LOS ANGELES MONEY MARKET FEBRUARY FUND
BELGIUM MONEY MARKET FUND DECEMBER

etc.

really appreciate any help available.

thank you.
 
Dim rng as Range
Dim i as Long
set rng = Cells(rows.count,3).End(xlup)
for i = rng.row to 1 step -1
if instr(1,cells(i,3),"money market",vbTextCompare) then
cells(i,3).EntireRow.Delete
end if
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top