Essentially what I wanted this macro to do was search column O and if the value in the row did not equal "External" then it would delete the entire row.
But the macro I tried to write below is deleting every row...
Any insight would be greatly appreciated! Thanks!
Sub Delete_Internals()
Sheets("Data Format Sheet").Select
ActiveWindow.SmallScroll Down:=-24
Range("A1").Select
Dim LR As Long, i As Long
LR = Range("O" & Rows.Count).End(xlUp).Row
For i = LR To 2 Step -1
If Not Range("O" & i).Value Like "External" Then Rows(i).Delete
Next i
End Sub
But the macro I tried to write below is deleting every row...
Any insight would be greatly appreciated! Thanks!
Sub Delete_Internals()
Sheets("Data Format Sheet").Select
ActiveWindow.SmallScroll Down:=-24
Range("A1").Select
Dim LR As Long, i As Long
LR = Range("O" & Rows.Count).End(xlUp).Row
For i = LR To 2 Step -1
If Not Range("O" & i).Value Like "External" Then Rows(i).Delete
Next i
End Sub