Get rows which match selection criteria

  • Thread starter Thread starter Fred Smith
  • Start date Start date
F

Fred Smith

I have an external file with about 20,000 rows in it. Each row has 6
columns. I need to work with all the rows where Column C = 'Name'. There
will be a maximum of 25 rows.

If I were doing it manually, I'd turn on Autofilter, select my Name in
Column C then copy the visible rows.

What's the most efficient way to do this in a macro? Is it best to copy the
cells into an array? If so, how?

Thanks,
Fred
Please reply to newsgroup, not e-mail
 
What is the format of the external file - csv, fixed width, a database file?

Can you open it in excel and it separates into appropriate columns?

If so, one obvious choice is to open it in excel, apply the autofilter and
get you data. (using a macro of course).
 
Back
Top