E
Eva Shanley
One of the departments here has a spreadsheet in which
they add or delete stores on a pretty regular basis; the
store numbers are used in at least 5 sheets. I have a
store table that copies the stores to each of the sheets,
but my problem is that if stores have been deleted, the
last few rows show #REF!. I want to delete the rows with
#REF! in them, but my code runs okay until the first #REF!
and then I get a Type mismatch error on line 2. Any help
is always appreciated. TIA
Range("D8").Select
Do Until ActiveCell = "" -Type mismatch error
If ActiveCell <> "#REF!" Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Delete
ActiveCell.Offset(0, 6).Select
End If
Loop
they add or delete stores on a pretty regular basis; the
store numbers are used in at least 5 sheets. I have a
store table that copies the stores to each of the sheets,
but my problem is that if stores have been deleted, the
last few rows show #REF!. I want to delete the rows with
#REF! in them, but my code runs okay until the first #REF!
and then I get a Type mismatch error on line 2. Any help
is always appreciated. TIA
Range("D8").Select
Do Until ActiveCell = "" -Type mismatch error
If ActiveCell <> "#REF!" Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Delete
ActiveCell.Offset(0, 6).Select
End If
Loop