Can anyone tell me why this is not working?
This is suppose to check each row on the sheet and if C * E < 3000 then delete that row. I've rewritten this sub many time but cannot get it to work properly.
In advance. Many Thanks!!
Sub Filter_Two()
Dim valPrice As Currency
Dim valQTY As Variant
FinalRow = ActiveSheet.Range("A65536").End(xlUp).Row
For i = 2 To FinalRow
'If ActiveSheet.Range("A" & i).Text = "" Then Exit Sub
valQTY = ActiveSheet.Range("C" & i).Value
valPrice = ActiveSheet.Range("E" & i).Value
If valPrice * valQTY < 3000 Then
Rows(i).Activate
Rows(i).Select
Rows(i).Delete
FinalRow = FinalRow - 1
End If
Next i
End Sub
Bookmarks