View Single Post
 
Old 01-13-2019, 12:35 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 949
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

Quote:
Another way

...Journal:JNL231648:::EX-WRC18:World Retail Congress 2018:Invoice SIN106952:1517,:::
OP has ":" in original string BEFORE "Invoice" too! And I'm afraid OP needs all invoice numbers, not only ones starting with "SIN".

In case this is an one-time project, then the best solution is to use Peckoflyer's solution (Text to Columns) to get all same type strings into separate columns (it looks like number of ":"s in every string is same) - then it will be looking for right column to get invoice numbers.
If this will be repeated import procedure, then choices will be:
1. Have a separate empty sheet for import data (DataImport), and a separate sheet for main data (Data). Copy imported strings into DataImport. Use Text to Columns to distribute data into columns. Copy wanted columns of data into table on sheet Data (Add to bottom of table). Delete all columns with data in sheet DataImport. Downside: A lot of manual work every time OP imports new data;
2. Have a separate sheet for import data (DataImport) with column for imported strings, and a separate sheet for main data (Data). Copy imported strings into DataImport (add to column for imported strings). Use a lot of helper columns with formulas to get all parts of strings into separate columns (Find part of string left of 1st ":" and right of 1st ":". Repeat the same process with right part of string from previous step - until all parts are read into separate columns. In sheet Data, use formulas to read info from proper column in sheet DataImport. Downside: A lot of formulas are used, which may slow down the workbook considerably, when the number of table rows gets over 10000;
3.Import new data into text file (or rename the file you get with new data as text file - change file extension to "txt"). Open new Excel instance. Start Open File dialog, set file type to Text, and select import file. Open. Set delimiter to ":", optionally set formats for columns, and open file - data is read in into different columns. Copy data from this file into your workbook.
Reply With Quote