Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default opening a text file

Hi everybody.

I made a macro that opens a delimited text file. It works
fine but sometimes I only need certain rows of data
instead of the whole file. For instance I only need the
rows in which the value in the first column is "A". Is it
possible to set this kind of criteria?

Thanks.

DK
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default opening a text file

Of course this is possible. The way I would implement it would be usin
Data/Autofilter.

I assume that you used the macro recorder to create the macro you no
have for importing the text file.

Do the same thing. Turn on the macro recorder, import the text file.
With the macro recorder still on, select the header in the column yo
want to do the selection with. Hold down the Ctrl key and press th
down arrow. From the menu, select Data Filter AutoFilter. Clic
on the arrow next to the header. Select the criterion you want (th
letter "A"). Hit the F5 key (go to). Click on the Special button.
Click the radio button next to Current Region, then click OK. Copy th
selected range. Go to another sheet and paste. Go back to th
original sheet and, from the menu, select Data Filter AutoFilte
again to turn off the AutoFilter.

Turn off the macro recorder

--
Message posted from http://www.ExcelForum.com

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
Opening a text file Khawajaanwar Excel Discussion (Misc queries) 8 June 14th 05 12:58 PM
Opening a text file in excel Opyuse Excel Discussion (Misc queries) 4 June 13th 05 09:23 PM
Opening text file in Excel Eric[_6_] Excel Programming 1 December 10th 03 05:18 PM
Opening Text File From internet mudraker[_34_] Excel Programming 0 November 24th 03 03:06 AM
when opening a text file.... Excel[_3_] Excel Programming 0 October 2nd 03 03:24 AM


All times are GMT +1. The time now is 08:39 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"