hi all
could someone please advise how you would write
to keep data in column "A" that starts with "HL"
here is the code i have written but the last part is incorrect and i don't know what to put
please help
Sub deleterows()
Dim j, lastrow As Long
Dim dest As Long
Dim x As Range
Worksheets("hostbalme").Activate
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For j = lastrow To 1 Step -1
Set x = Cells(j, "A")
x.Select
If (x.Value, 2) = "HL" Then x.EntireRow.Delete
Next j
End
End Sub
could someone please advise how you would write
to keep data in column "A" that starts with "HL"
here is the code i have written but the last part is incorrect and i don't know what to put
please help
Sub deleterows()
Dim j, lastrow As Long
Dim dest As Long
Dim x As Range
Worksheets("hostbalme").Activate
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For j = lastrow To 1 Step -1
Set x = Cells(j, "A")
x.Select
If (x.Value, 2) = "HL" Then x.EntireRow.Delete
Next j
End
End Sub