convert to numbers

%3CLINGO-SUB%20id%3D%22lingo-sub-1405522%22%20slang%3D%22en-US%22%3Econvert%20to%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1405522%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI'm%20quite%20new%20at%20excel%20and%20I%20need%20your%20help.%20So%20I%20exported%20data%20from%20python%20to%20txt%20file%20and%20then%20I%20imported%20it%20to%20excel%20and%20the%20data%20is%20read%20by%20excel%20as%20text%20instead%20of%20numbers.%20I%20alredy%20try%20a%20few%20methods%20like%20a%20function%20VALUE%20or%20changing%20cell%20type.%20What%20can%20I%20do%3F%20Any%20ideas%3F%20I%20want%20to%20work%20with%20this%20numbers%20so%20i%20really%20need%20to%20convert%20them.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1405522%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1405575%22%20slang%3D%22en-US%22%3ERe%3A%20convert%20to%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1405575%22%20slang%3D%22en-US%22%3Ewell%2C%20those%20numbers%20worked%20just%20fine%20for%20me.%20They%20do%20show%20a%20'warning'%20on%20those%20cells%20which%20when%20I%20open%20it%20says%20number%20stored%20as%20text%20and%20even%20gives%20me%20option%20to%20convert%20to%20numbers.%20That%20said%2C%20if%20a%20do%20a%20formula%20in%20another%20cell%20like%20%3Da2%2Bb2%20it%20works%20just%20fine%20for%20me.%20I%20also%20used%20the%20double%20'-'%20to%20convert%20them%20to%20numbers.%20basically%20in%20col%20C%202%20used%20%3D--a2%20but%20that%20should%20be%20the%20same%20as%20%3Dvalue(a2)%3CBR%20%2F%3Edon't%20know%20if%20that%20was%20any%20help%2C%20sry.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1405654%22%20slang%3D%22en-US%22%3ERe%3A%20convert%20to%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1405654%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F674156%22%20target%3D%22_blank%22%3E%40medzik%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20convert%20those%20numbers%20into%20real%20numbers%2C%20follow%20these%20steps...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3ESelect%20the%20whole%20column%20A%20by%20clicking%20on%20the%20column%20letter%20A.%3C%2FLI%3E%3CLI%3EGo%20to%20%3CSTRONG%3EData%20Tab%3C%2FSTRONG%3E%20--%26gt%3B%20and%20click%20on%20%3CSTRONG%3EText%20to%20Columns%3C%2FSTRONG%3E%20and%20directly%20click%20on%20%3CSTRONG%3EFinish%3C%2FSTRONG%3E%20in%20the%20first%20step.%3C%2FLI%3E%3C%2FOL%3E%3CP%3EThis%20will%20convert%20the%20numbers%20in%20column%20A%20to%20real%20numbers.%20Repeat%20the%20above%20steps%20for%20column%20B%20separately.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnce%20the%20numbers%20are%20converted%20into%20the%20real%20numbers%2C%20the%20decimal%20values%20will%20be%20truncated%20to%20two%20decimal%20places%20but%20the%20underlying%20numbers%20remain%20intact.%20You%20may%20increase%20the%20decimal%20places%20for%20these%20columns%20as%20per%20your%20requirement.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Hello,

I'm quite new at excel and I need your help. So I exported data from python to txt file and then I imported it to excel and the data is read by excel as text instead of numbers. I alredy try a few methods like a function VALUE or changing cell type. What can I do? Any ideas? I want to work with this numbers so i really need to convert them.

2 Replies
Highlighted
well, those numbers worked just fine for me. They do show a 'warning' on those cells which when I open it says number stored as text and even gives me option to convert to numbers. That said, if a do a formula in another cell like =a2+b2 it works just fine for me. I also used the double '-' to convert them to numbers. basically in col C 2 used =--a2 but that should be the same as =value(a2)
don't know if that was any help, sry.
Highlighted

@medzik 

To convert those numbers into real numbers, follow these steps...

 

  1. Select the whole column A by clicking on the column letter A.
  2. Go to Data Tab --> and click on Text to Columns and directly click on Finish in the first step.

This will convert the numbers in column A to real numbers. Repeat the above steps for column B separately.

 

Once the numbers are converted into the real numbers, the decimal values will be truncated to two decimal places but the underlying numbers remain intact. You may increase the decimal places for these columns as per your requirement.