View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
joel[_714_] joel[_714_] is offline
external usenet poster
 
Posts: 1
Default Extract data from csv file


I forgot that I had 1 minor error in the oringal posting that I didn't
fix so it gave you the row number in the CSV file instead of the row
number in the workbook.

from
Range("B" & RowCount) = RowCount
to
Range("B" & RowCount) = C.Row




There werre two thing I did that weren't obvious to keep the data as
text


1) Format columns A & b as Text

from:
.Columns("A:B").NumberFormat = "@"
to:
.Columns("A:D").NumberFormat = "@"

2) Use a variable that was declared as a string

From:
Dim Data As String


To:
Dim Data As String
Dim Data1 As String
Dim Data2 As String


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=180054

Microsoft Office Help