powerpivot beginner
Member
Hi, I have a big set of trade stats of more than 50000 lines.
I want to keep only certain lines when column B starts with certain numbers.
For the below that I found online, it will only keep lines starting with 29.
I need to keep lines if column B has numbers starting with 292, 293 and 350. Please advise
I want to keep only certain lines when column B starts with certain numbers.
For the below that I found online, it will only keep lines starting with 29.
I need to keep lines if column B has numbers starting with 292, 293 and 350. Please advise
Code:
Sub DeleteRowsNotStartingWith29()
Application.ScreenUpdating = False
Columns("B").Replace "29", "=29", xlPart
On Error Resume Next
Columns("B").SpecialCells(xlConstants).EntireRow.Delete
On Error GoTo 0
Columns("B").Replace "=29", "29", xlPart
Application.ScreenUpdating = True
End Sub
Last edited by a moderator: