View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default import data from txt file to an existing excel file

The best method is to import the text file into a temporary worksheet and
then move the data from the temporary sheet to the third column on you detail
sheet. if you record a macro while importing the data using fixed width and
specify on which columns the employee no, and the salery appears on the
imported sheet, then post the recorded macro, it would make the process of
writing the macro very simple.

"shaji" wrote:

Hi !

I have an excel file for sending salary details to bank. 1st column - empl
code no., 2nd column-Account No. and 3rd column i want to fill the salary for
the month.
I am getting the salary details through a fixex width txt file every month.
I would like to have a macro which check the employee code in the excel file
and check for the same in the txt file and return the salary of the employee
in the 3rd column in the excel file.

Thanks in advance