Question

I am working with a textfile that contains content that I would like dividing.

The content itself looks like the following:

ACC_HOLDER1      ACC-AQD             A        00      FULL NAME OF ACCOUNT HOLDER 1
ACC_HOLDER2      ACC-HED-2           A        00      FULL NAME OF ACCOUNT HOLDER 2
ACC_HOLDER3      ACC-HSD-3           A        00      FULL NAME OF ACCOUNT HOLDER 3
ACC_HOLDER4      ACC-HFD-4           A        00      FULL NAME OF ACCOUNT HOLDER 4
ACC_LINS         ACC-LGNK            N        00      Account Link
ACC_NUD          ACC-NW              A        00      ACCOUNT NUMBER
ACC_OEEN         OPEN-REL            N        06      DATE ACCOUNT OPENED i.e  01/01/2008

Is there a way I can divide this into columns to be used in excel? Or is there a way I can delete the content after the first column part (so delete anything after ACC_HOLDER1 on that particular row)?

I believe the solution to this may be based on using the parsing of the spaces as there seems to always be 6 or more spaces between the data that appears in the first column with the next bit of data on the same row.

Any help would be greatly appreciated.

Kind Regards

SB

Was it helpful?

Solution

Just copy and past the raw data into excel, it will initially appear as a single column. Select the whole column by clicking on the column header (e.g. "A"). Under the Data menu, there should be an option "Text to Columns" (in 2013). In older versions there should be something similar under the Tools or Data menus. Choose the delimiter (in this case "space") and to treat consecutive delimiters as one. Should be a menu preview like this:

Wizard to convert columns

Select Finish and presto... you're done.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top