Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 623
Default Get rows which match selection criteria

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Get rows which match selection criteria

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).

--
Regards,
Tom Ogilvy

"Fred Smith" wrote in message
...
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I Remove Rows that match a criteria Mahesh Excel Discussion (Misc queries) 3 April 30th 07 10:58 PM
Count rows that match 3 sets of criteria? EricE Excel Worksheet Functions 3 December 29th 05 04:26 PM
How can I retrieve multiple rows that match one criteria, i.e. a d Morgs Excel Worksheet Functions 3 September 1st 05 03:19 PM
How to get number of rows which match criteria kiranmani Excel Worksheet Functions 6 July 11th 05 03:41 PM
Copy Rows if Lookup Criteria Match vdoubleu Excel Discussion (Misc queries) 0 March 29th 05 06:43 PM


All times are GMT +1. The time now is 06:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"