View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave[_11_] Dave[_11_] is offline
external usenet poster
 
Posts: 41
Default Import a comma delimited file & match records

Javed, I am sorry I can not load the file to big and contains info I
can not load.

Gary,

No that is not the first line of data I was trying to show what the
data lebels were.
the .csv file just contains row after row of data like
0010,BBBB,11,01,Iron works ,Grills ,
000000130,0000003448635
Each code pair is unique.
So far I have been manuall copying and pasting the data. I entered the
initial 200 codes by hand & now I want to be able to compare and
insert the updated values in a macro,

thanks in advance again.

On Feb 15, 10:03*am, GS wrote:
It happens that Dave formulated :

Code1,Code2,YR,MM,CoName,Dept_name,Quantity,$amoun t


Is this the first line in the file. If so then I suggest using ADO to
grab the data into recordset[s] and write the appropriate values to
your worksheet. Each recordset could be unique for each Code# pair, OR
you could process each record of a recordset containing all data in the
file.

If the field names are not the first line in the file then this can be
prepended (via VB file I/O functions) so ADO knows what these field
names are.

Just curious.., why do you not copy the 2 Code# when copying the other
data? How do you handle a new month entering the first data onto its
sheet?

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc