Copying specific data from Word to Excel

D

Dee Sperling

What I need to do is
1) Extract the monetary amount (always after the 2nd asterisk (*) after the
letters BPR.
2) Extract the number (always after the 2nd asterisk (*) after the letters
TRN.
3) Place the numbers in the same row on an Excel spreadsheet.
4) Repeat to the end of the document.

Sample dat
BPR*I*925.79*C*ACH*CCP*01*xxxxxxxxxxxx*DA*xxxxxxxxxxxxxxx*xxxxxxxxxxxxxxx**01*xxxxxxxxxxxx*DA*xxxxxxxxxxxxxxx*20091126~TRN*1*999999999*xxxxxxxxxxxx

The file I need to extract from is always text.

Is this better done from a Word macro or an Excel macro. Or can it be done
at all.

Thank you for reading.
Dee
 
D

DaveLett

Hi,
Do you have to use a macro? I would use Excel for this. That is, it looks
like your data will be formatted consistently and have the same number of
data elements, all of which is separated by an asterisk. Therefore, use the
Text Import Wizard to get the data into Excel and then manipulate the data
(delete/hide columns and so on) from there.

HTH,
Dave
 
Top