Hello griffinco,
The macro has been tested on the file you posted. When "BEGINSUB" is detected a new line is started with the first column containing what followed "BEGINSUB". A new column is filled on this row if the follow are found anywhere in the text: FLWSYM, PURPOSE, ns, /ns. These comparisons are case sensitive to avoid the "NS" in "BEGINSUB" from being the same as "ns" elsewhere. The "ns" string is expected to have zero or more characters after it followed by a colon. This was based on your file. If this needs to be changed, let know.
The macro assumes your will be copying the data to active sheet and starts with cell "A1". This can changed if needed. You will prompted o locate the file to be opened. This seems like a better option than hard coding the path and file name into the macro. Let me know if any changes need to be made or you have any problems.
Bookmarks