I am trying to write VBA to delete data in column A containing the reference "BUD + the current month for eg BUD0806. Next month the reference could be BUD0906. As can be seen the BUD reference can change. I need VBA code to cater for the change and there to delete the entire row containg the code beginning with BUD
I have used the following code, but cannot get it to work
LastRow = Range("A65536").End(xlUp).Row
For i = LastRow To 2 Step -1
If Cells(i, "A").Value = "BUD*.*" Then Cells.Rows(i).Delete
Next i
Your assistance will be most appreciated.
Howard
I have used the following code, but cannot get it to work
LastRow = Range("A65536").End(xlUp).Row
For i = LastRow To 2 Step -1
If Cells(i, "A").Value = "BUD*.*" Then Cells.Rows(i).Delete
Next i
Your assistance will be most appreciated.
Howard