View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Macro to open folder and let you chose file, then continue import

Record a macro when you open that text file manually. You'll see all the
details that you need for parsing your data.

And maybe you can sort your range so all the empty cells go to the bottom?

or...

Can you pick out a column that always has data in it if that row is used? I
used column X for my sample code:

On error resume next
activesheet.range("x:x").cells.specialcells(xlcell typeblanks).entirerow.delete
on error goto 0

rascal wrote:

Hi:
I am trying to create a macro that when run will open a particular folder,
let you select the text file, than import it. I have gotten the marco done
that opens the folder, however once I choose the file I am not sure how to
proceed. Right now I do it manually, when I import it I use the text import
wizard and chose "Fixed width", start the import at line 9, move the lines so
that they are in the proper place, then import it into excel. Once in excel
I remove all the empty rows, which is every other row. Can I accomplish all
this with either 1 or 2 macros. If so, any ideas on how?
Thanks a lot for any help.


--

Dave Peterson