Deleting a row where characters 34, 35, 36 are 000

Joined
Jul 20, 2011
Messages
1
Reaction score
0
Hi, I'm doing work experience with no experience in excel VBA and I've been asked to write the code for the following purpose:I have a list of files and within a macro, not starting a new one, i have to delete or not include the files where the 34th, 35th and 36th character of each row = 000 using a button already created.Do you know the code that i can include in a macro to do this? Thanks.
 
You can check a cell's value for that condition by using code like:

For Each myC In Range("A2",Cells(Rows.Count,1).End(xlUp))
If Mid(myC.Value,34,3)="000" Then myC.ClearContents
Next myC

This example will check a list in column A, starting in row 2, but, overall, you question is way too vague to offer more meaningful help. If you post the code that you already have....

Bernie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top