I'm looking for some Excel VBA code which takes price data from
a CSV text file like the one below and looks for the same initial
three-letter code in the spreadsheet, then inserts the price (from
the sixth column into the price column on the spreadsheet.
It needs to loop through the whole text file of course.
Anyone have some code which might do this or something
similar please?
AAC,01,134,134,130,130.5,5094
AAF,01,0.4,0.5,0.4,0.5,15000
AAM,01,15.5,15.5,14.5,15,3170
AAR,01,2.6,2.6,2.6,2.6,1000
AAX,01,377,384,375,377,5212
AAZPB,21,5800,5860,5800,5860,11
ABB,01,895,901,889,891,6367
ABC,01,226,229,224,228,49135
ABP,06,36.5,37,36,36.5,27157
ABQ,01,16,16.5,15.5,15.5,2090
ABU,01,2.4,2.6,2.3,2.5,11386
ABY,01,71.5,71.5,66,66,15150
Sample spreadsheet:
ABC 15/07/2009 122 $16.41 $16.94 3.23%
BHP 15/07/2009 60 $34.14 $37.50 9.84%
BXB 15/07/2009 348 $5.75 $6.00 4.35%
CBA 15/07/2009 52 $38.54 $39.76 3.17%
FGL 15/07/2009 376 $5.32 $5.51 3.57%
NAB 15/07/2009 86 $23.24 $22.26 -4.22%
RIO 15/07/2009 40 $49.90 $57.55 15.33%
SUN 15/07/2009 302 $6.62 $6.85 3.47%
Bookmarks