View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default VBA Macro to copy an column from one Excel file into another file

Hello,

I kept trying to get this to work, but my knowledge of VBA is insufficient
for this task.

I have 85 tab-delimited text files in folder c:\input\
I have one input Excel file - c:\input.xls
I need to

1. Open the first text input file

2. copy the third column of this file and paste it into the third column of
c:\input.xls

3. Allow c:\input.xls to recalculate the values in all other columns

4. Save the resulting file as a tab-delimited text file in folder
c:\output\ under the same file name as the name of the file from which we
copied the third column.
(i.e., if we the file that we opened in step 1 was c:\input\acmaininput.txt,
then in step 4 we want to create the file c:\output\acmaininput.txt)

5. Repeat steps 1-4 until we do this for all 85 files in c:\input folder.

I would be very grateful for any help with this. Thank you!