I am trying to create a VBA script that will go through column "A" in my spreadsheet and delete any Row that starts with a cell that contains the words "Div Code:" The problem is, that the cells contain a lot more text after "Div Code" and I can't figure out how to make the .replace function work on partials. Here's what I have thus far:
Sub FindDivCode()
With Intersect(Columns("A"), ActiveSheet.UsedRange)
.Replace "Div Code", "#N/A", xlPart
.Replace "Date", "#N/A", xlPart
.SpecialCells(xlConstants, xlErrors).EntireRow.Delete
End With
End Sub
This script works for the "Date" cells, but not the "Div Code" Cell's. Any help will be greatly appreciated!
Paul