Link to home
Start Free TrialLog in
Avatar of zachvaldez
zachvaldezFlag for United States of America

asked on

formatting column as text

I have a column upc which is displayed in scientific notation but I’d like to format as text by placing an apostrophe before the first character so it left aligned
Avatar of Bill Prew
Bill Prew

You could just do a custom numeric format on that column, with something like "000000000009", that would be the simplest.

Or you could could create a text version in another column using a formula like =TEXT(A2,"000000000009"), and if desired then copy by value back to the original column.

If you really do want to change the existing cells to text with no formatting changes, or copying of cells, then you would need a VBA macro to do that, but that feels like more work / complexity than needed.

You can use the "Text to Columns" option on the Data tab to change the number to text. Select the column you want displayed as text. Then click the "Text to Columns" option. Select "Delimited" for Step 1, unselect all delimiters on Step 2, and finally select "Text" on Step 3.

If you are doing it

... so it left aligned

Then why not simply change the cell alignment to left?

Avatar of zachvaldez


Shaune, your suggestion work for that moment, it does look right but when I save the file back as CSV(because that is the original format) and open the file again, UPC column is back to scientific notation look.

Avatar of Shaun Kline
Shaun Kline
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

thanks Sqib, That will only be good in screen . Save it and open it, it's back to original.