- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsOk another dumb question, but I have to ask, I have a worksheet, in the sheet can be up to 65000 lines of text, I need to go through the text to refine it. In column L starting on Row 2 I need it to delete every row that does not contain the numbers:
13 20 21 22 23 24 27 28 91 92 93 94 95 and this list could grow later down the road so I would like to be able to simply add a number to it if needed.
Problem i am having is the column contains i.e.
Crtn Shortage-Freight Bill Signed Short [24]
Merchandise Billed Not Shipped [22]
So I would need the VBA code to look in this column, and see that there is [22] or [24] or any of the numbers I had listed, if those numbers are in the string, then delete the row, and move on to the next row.
Is there a simple way I can do this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: matthewspatrickPosted on 2009-04-24 at 11:21:37ID: 24227822
The following sub uses Regular Expressions to look for the number code, and tries to find it in a constant
that contains all the 'allowed' codes. If not found, the row is deleted.
Patrick
Select allOpen in new window