I have looked around and found nothing


Posted by Todd on July 12, 2001 11:15 AM

Okay, so here’s the problem: I am trying to write a macro that will take data points and some of the information associated with those data points from a text file and place this information into a spreadsheet. Is it even possible to do? Here is an example of what I want:

Raw Data:

INIT/AL551BD1, DL, 1.0, IV = F, J4 = 0,
DG = 0, ED = 'BLADE DIFFERENTIAL ',
ST = 'ALARM ', RS = 'NORMAL', HW = 00000H, AP = 3, LC = 1, AR = 1, BP = 0


INIT/AL5RTD16, AL, 1.0, IV = 0.000, FM = 2,
DG = 0, TB = 20, BB = 0,
ED = 'GEN STATOR TEMP SPREAD -CNTR- ', EU = 'C DEG ',
EV = 0.00000, CD = 0, HW = 00000H, AP = 22, LC = 1, HL = 10.0000, LL = -100.000, IL = 0.00000, DB = 0.00000, HS = 0.00000, LS = 0.00000

What I want in the spreadsheet:
(DataPoint) (Information)
INIT/AL551BD1 DL ED = ‘BLADE DIFFERENTIAL'
HW = 00000H

INIT/ AL5RTD16 AL ED = ‘GEN STATOR TEMP SPREAD’ HW = 00000H

-Each field needs to be in its own cell and each data point (with its corresponding information) needs to be in its own row e.g. A1 = INIT/AL551BD1, A2 = DL, etc. I think one of my biggest problems is that some of the data points will take up four lines and others will take up five or six. I want to use Excel because the 'HW' number is hexidecimal and I need to do some conversions on it (that's the easy part). I’m starting to think that this is an impossible task since the format of the raw data isn’t consistent and isn’t all on a single line. I can’t imagine, though, that I’m the first person with a problem like this. I have tried using input statements and Get statements. I’m thinking that this macro is going to require some serious IF statements to be able to search through the text and find everything I’m looking for. Does anyone have any suggestions??? Thanks.

Posted by lenze on July 12, 2001 2:50 PM

You might try the import text file wizard. Look under Data>Get External Data>Import Text. If you do not see it, you may have to install the MS Query Add-In.



Posted by Todd on July 12, 2001 4:25 PM

Yeah, that was one of the first things I tried. It would miss several of the data points. That's when I decided that writing a program was the only way to go. I have also been trying to just work in Word with a macro that will copy all the information that I want at the bottom of the document. Then I would import into Excel the way normal people do. Thanks anyway Lenze for the suggestion. I appreciate it.

Todd