Hi I want a macro to delete the entire row based on the value in Column Q
I've trid to write a code but it doesnt work
Sub marg()
Dim cell As Range
Dim Ranger As Range
Dim t As Long
t = Sheets("marg").Range("Q" & Rows.Count).End(xlUp).Row
Set Ranger = Sheets("marg").Range("Q2:Q" & t)
For Each cell In Ranger
If cell.Value <> "EUR" Or "FUTURE" Or "SHORT" Or "SPAN" Or "TIME" Then
cell.EntireRow.Delete
End If
Next cell
End Sub
So basially only if the cell in Column Q has value of EUR or FUTURE or SHORT or SPAN or TIME then the row maintains status quo, otherwise entire row has to be deleted
any thoughts?
thanks
Bookmarks