ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Convert text to columns (https://www.excelbanter.com/excel-worksheet-functions/190049-convert-text-columns.html)

Krish

Convert text to columns
 
I need to convert a .txt file which has data without a commas.
00120* ROASTED RED PEPPER SPREAD RETAIL 44.590 CS
02951*GORDAL OLIVES UNPITTED 2/5 LB 59.910 CS

The first 5 characters represent the product number and the text followed by
until the space is the Product description, then Pack size, Price and Unit
of Measure.

Seeking from the experts the best way to convert this data to columns
without much hassle.

Thanks.

Krish



Bob Bridges

Convert text to columns
 
Seems to me you might have to do this in two bites. The first import would
by column-dependant - "fixed width", that is - dividing the text into two
columns, ie the first five bytes and the rest. Then import the rest
space-delimited, marking multiple places as one. Would that work for you?

--- "Krish" wrote:
I need to convert a .txt file which has data without a commas.
00120* ROASTED RED PEPPER SPREAD RETAIL 44.590 CS
02951*GORDAL OLIVES UNPITTED 2/5 LB 59.910 CS

The first 5 characters represent the product number and the text followed by
until the space is the Product description, then Pack size, Price and Unit
of Measure.



All times are GMT +1. The time now is 11:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com