Hi there,
I'm struggling with a #REF! error showing up in certain cells after running a script to remove cells containing the specific text below. Column B is a =text(A#,"ddd") formula but column A has no references to any other cells.... Have to run the same routine every day and would really like a macro that doesn't break the data. Any suggestions? See images below of snippets of sheets.
Before (left) and after (right)
I'm struggling with a #REF! error showing up in certain cells after running a script to remove cells containing the specific text below. Column B is a =text(A#,"ddd") formula but column A has no references to any other cells.... Have to run the same routine every day and would really like a macro that doesn't break the data. Any suggestions? See images below of snippets of sheets.
VBA Code:
Sub deleteOlympicsrows()
Rows("1:1").Select
Selection.AutoFilter
Range("D1").Select
ActiveSheet.Range("$A$1:$C$10000").AutoFilter Field:=3, Criteria1:= _
"=*OLYMPICS*"
ActiveSheet.Range("$A$1:$C$10000").Offset(1, 0).SpecialCells(xlCellTypeVisible).EntireRow.delete
ActiveSheet.AutoFilterMode = False
End Sub
Before (left) and after (right)
Last edited by a moderator: