import array text to row data in excel

N

nduy

dear all,
firstly i'd like to introduce my self, i'm dwi (pronounced like do we)
from indonesia, i use excel in daily work, but not vba,
right now i'm working with table data as i show you in attachment file

can somebody help me, how to convert this array text to rowed data in
excel, example of how i wanted to be showed in the attachment file

huge thanks
regard
dwi

Attachment filename: 031217.zip
Download attachment: http://www.excelforum.com/attachment.php?postid=395162
 
P

Patrick Molloy

There are several methods that you could use.
Here is one example:-

Paste the following code into a standard module

Option Explicit
Sub ImportRawData()

Dim sRawDataFilename As String
sRawDataFilename = Application.GetOpenFilename()

' user hit cancel
If sRawDataFilename = "False" Then Exit Sub

Workbooks.OpenText sRawDataFilename, _
DataType:=xlDelimited, _
semicolon:=True


End Sub


TIP: If you're new to VBA, try turning on the Macro
recorder ( under Tools/Macro), open the text file
manually, stop the recorder and then examine your code.
The code thus produced will give you a good idea of how
your own code might look.


Patrick Molloy
Microsoft Excel MVP
 
N

nduy

dear all...,
dear mr patric,

thanks for the tips, the macro recorder is new things for me, i can us
it in many of my importing process ;)

but for my need in importing source datas as i attached (RTE....txt) t
excel format it's not easy for me, because as you see the source i
dynamic

i'd like to use loop-things so my process go maybe like this

..
read line:

if belong to RTE=100 --> write RTE=100, write all the array data to ro
data in excel: for the ASP, ATTEMPT....(until) TRAFFIC

if still the datas belong to RTE=100 --> write RTE=100, write all th
array datas again,

if RTE <>100, RTE=XXX --> write RTE=XXX, write all the array data
belong to RTE=XXX

and so on like that until the datas is fineshed

sorry, i'm just an amateur in vba, but if i can see, sample coding
believe i can modify it

thanks for ur kind

dw
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top