wildturkey
Board Regular
- Joined
- Feb 21, 2006
- Messages
- 193
- Office Version
- 365
- Platform
- Windows
I have the following code which should look down a sheet and delete all rows where either Course or Consultancy appear in column B, however it doesnt
Any ideas please........
Range("A65000").Select
Selection.End(xlUp).Select
xlastrow = ActiveCell.Row
Range("b1").Select
For i = 1 To xlastrow
xtype = ActiveCell.Value
Select Case xtype
Case "Course"
ActiveCell.Rows("1:1").EntireRow.Select
Selection.EntireRow.Delete
Case "Consultancy"
ActiveCell.Rows("1:1").EntireRow.Select
Selection.EntireRow.Delete
End Select
ActiveCell.Offset(1, 0).Select
Next i

Range("A65000").Select
Selection.End(xlUp).Select
xlastrow = ActiveCell.Row
Range("b1").Select
For i = 1 To xlastrow
xtype = ActiveCell.Value
Select Case xtype
Case "Course"
ActiveCell.Rows("1:1").EntireRow.Select
Selection.EntireRow.Delete
Case "Consultancy"
ActiveCell.Rows("1:1").EntireRow.Select
Selection.EntireRow.Delete
End Select
ActiveCell.Offset(1, 0).Select
Next i