Hi there,
I have this below table which has data from A2 to F6 (which keeps changing every day, can even go upto A2 to F250). Basically i need to delete all the rows except with the word "Dune" in both Column B and Column E. In short i want rows 3 and 4 go from this list. I have this code which seems to be not working. Im a bit bad in VBA too ;-)
Sheets("Data").Select
Range("A1:E1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value <> "Dune" Then
Selection.EntireRow.Delete
Else: ActiveCell.Offset(1, 0).Select
End If
Loop
Range("A1").Select
I have this below table which has data from A2 to F6 (which keeps changing every day, can even go upto A2 to F250). Basically i need to delete all the rows except with the word "Dune" in both Column B and Column E. In short i want rows 3 and 4 go from this list. I have this code which seems to be not working. Im a bit bad in VBA too ;-)
Sheets("Data").Select
Range("A1:E1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value <> "Dune" Then
Selection.EntireRow.Delete
Else: ActiveCell.Offset(1, 0).Select
End If
Loop
Range("A1").Select