Avatar of zachvaldez
zachvaldez
Flag 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
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
zachvaldez

8/22/2022 - Mon
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.

Shaun Kline

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.
Saqib Husain

If you are doing it

... so it left aligned

Then why not simply change the cell alignment to left?

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
zachvaldez

ASKER

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.

ASKER CERTIFIED SOLUTION
Shaun Kline

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
zachvaldez

ASKER

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