View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Trevor Shuttleworth Trevor Shuttleworth is offline
external usenet poster
 
Posts: 1,089
Default Import CSV with match

Scottz

one way would be to use Input # to read the CSV file and process the records
one by one. This could be slow unless there are only a relatively small
number of records. See the Help file for Input.

Personally, I'd just import the entire file and then process the records
depending on the value in the first row, modified by the (V)LOOKUP into the
other worksheet.

Another option is to use Data | Get external data | Import text file to get
the data into a worksheet and then process it.

You could always create a temporary sheet, import the data, massage it, move
it and then delete the temporary sheet.

Regards

Trevor


"Scottz " wrote in message
...
Hello all,

Apologize if this is in the wrong group.

I'm trying to create a VBA macro (Excel 2003) to import a CSV file,
match the first field in the CSV file to a matching cell in the
worksheet (column b), and import the rest of the csv data starting at
colomn c.

Ultimatly I would like to automate the process using templates to build
up a workbook with several sheets that import data like this.

I've tried searching for examples or other ideas on this but haven't
had much luck so far.

Any help would be appreciated.

Many Thanks,
Scottz


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