Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
opening a text file
Best to copy\paste your macro here for comments.
-- Don Guillett SalesAid Software "BigD" wrote in message ... 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening a text file | Excel Discussion (Misc queries) | |||
Opening a text file in excel | Excel Discussion (Misc queries) | |||
Opening text file in Excel | Excel Programming | |||
Opening Text File From internet | Excel Programming | |||
when opening a text file.... | Excel Programming |